Circle Generator

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
toddnollan
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri May 19, 2017 9:55 am
Contact:

Circle Generator

Post by toddnollan » Fri Jun 16, 2017 2:29 am

This returns points (x,y) on a circle, given the quantity of points (Signal Q), Diameter of the circle (Signal C), and the index of which point to return (Signal i).
I designed it for use with AAI things, but it does not require AAI and uses only vanilla signals.
The circle is probably not mathematically precise, but it does pretty well. The return points are always centered on 0,0. To change that, add the x,y offset to them with a constant combinator.
It counts clockwise, 0 being at the absolute bottom.
If Index is higher than Quantity, it will simply treat it as a restart of the loop; for instance, with a quantity of 7, an index of 9 will be interpreted as 2.
A Quantity above 1000 will probably cause problems and freak out, so keep it below that.

This uses no loops, and will handle the Index changing every tick.

The blueprint has the first combinator set to a Quantity of 50 and a radius of 35, with an index of 0. These are the values to change, or input.
Pictures
Blueprint

Post Reply

Return to “Combinator Creations”

Who is online

Users browsing this forum: No registered users