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
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri May 19, 2017 9:55 am
Contact:

Circle Generator

Post by toddnollan »

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

b_d
Inserter
Inserter
Posts: 22
Joined: Sat Jul 13, 2019 2:49 pm
Contact:

Re: Circle Generator

Post by b_d »

BluePrint of Concrete circle does the same thing to measure the the gun radius or darken the opaque settings of the Alpha settings

Post Reply

Return to “Combinator Creations”