I want to create a combinator that represents sine and cosine functions.
Is there a better way to build a machine that performs this kind of circuit processing, other than using the tick event?
And to implement this, do I have to keep track of every combinator entity and run a loop on each tick?
How to create a new combinator?
How to create a new combinator?
I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.
Re: How to create a new combinator?
Yes, you must use the on_tick event to get input from a circuit network.
Output must be a constant-combinator where you set your processed signals.
Output must be a constant-combinator where you set your processed signals.
Re: How to create a new combinator?
Must is a wrong word, constant combinators are a common option, but decider combinator can also be a good choice if your entity has input and output sides, since decider's outputs can also be freely manipulated.DaveMcW wrote: Sun Nov 09, 2025 9:24 pm Output must be a constant-combinator where you set your processed signals.
Re: How to create a new combinator?
The Sine function can be implemented using a Lookup table, with a Filter Combinator in "Select Input" mode:
The values are normalized to three digits (1.000 = 1000), with an extra Arithmetic Combinator to account for 0-indexing. As-configured, this mechanism displays sin(30) = 500. With a bit more work this circuit could be extended to handle 91+ degree Input values using the Arithmetic Combinator's Modulo operator and some more Deciders.... but I got bored and stopped here.
I hope somebody finds this useful!
The values are normalized to three digits (1.000 = 1000), with an extra Arithmetic Combinator to account for 0-indexing. As-configured, this mechanism displays sin(30) = 500. With a bit more work this circuit could be extended to handle 91+ degree Input values using the Arithmetic Combinator's Modulo operator and some more Deciders.... but I got bored and stopped here.
I hope somebody finds this useful!



