Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make time-variation smoother #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ArthurGoodman
Copy link

@ArthurGoodman ArthurGoodman commented Nov 17, 2024

I noticed that with t=sin(time) the variation of the art with time is kind of not ideal, because it just oscillates between two states.
To mitigate that the most natural solution seems to be to add a second time variable, that will change with cos, so I added s=cos(time).
With this instead of oscillating between two states, the art continuously rotates through the seamless set of states.
Quite a simple change, that significantly improves the aesthetics IMO :)

EDIT: As suggested by @adam-devel , I made t=time and added cos function. This allows to achieve the same result, but is more simple and flexible.

@ArthurGoodman
Copy link
Author

Example:

output-scaled.mp4

@adam-devel
Copy link

adam-devel commented Nov 21, 2024

Operations on time should be managed at the grammar level, it makes more sense to expose the raw time as t, then introduce sin(t) and cos(t) as terminal symbols alongside x and y etc..
This offloads the computation of these functions to the GPU, makes the source code simpler.

Otherwise you will have to edit the source code whenever you want to add another "timeline" so to say

@ArthurGoodman
Copy link
Author

@adam-devel Oh yea, this makes a lot of sense. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants