4
$\begingroup$

I have an equation that I'm trying to animate in Blender 2.79b

The equation is. $$y=e^{{{\log \left(1-x^{{\it (S*T)}}\right)}\over{{\it (S*T)}}}}$$

Where:

T={1.12,0.96}  % The variable **T** would be a slider in blender*
𝑆={15.3039,10.3612,7.9153,6.3793,5.3019,4.4955,3.8656,3.3584,2.9405,2.5903,2.2926,2.0367,1.8146,1.6204,1.4496,1.2983,1.1638,1.04377,.93622,.83959,.75256,.67401,.603,.53871,.48045,.42762,.37969,.33619,.29673,.26094,.22852,.19917,.17265,.14874,.12722,.10791,.090664,.075316,.061733,.049793,.039383,.030399,.0227475,.0163414,.0111008,.0069525,.0038286,.0016664,.0004081}

My thought process / how I created it in Octave / Matlab

Step 1. Evaluate the equation for several values of S and T to see if it works and plot. See image below.
Step 1 test formula

Step 2. Evaluate the equation for all the given values of S and T and plot. See image below. Step 2 image

Step 3. Duplicate object created in Step 2 so I can rotate them at different time values to create / animate different Moire patterns. See image below. Step 3 image

I'm trying to reproduce it using Blender / Animation nodes. But I'm not sure how to correctly loop through all the different values of 'S'. Then duplicate that object for rotation. See current Blender file / image below. Animation math nodes

The goal is to create different equations and animate them to create different animated Moire patterns. Something like the example animation below but using different patterns created with equations.

Example animated Moire gif

I tried following 3DSinghVFX answer but I had some issues with his/her step 3 some of the options are either missing or other nodes are being added for me anyone know why? See animation below of what happens (I circled the things that are different in 3DSinghVFX answer in my animation when I tried to create them) I'm running Blender 2.79b.

Issues I ran into

$\endgroup$
6
$\begingroup$

This is very easy to do, here I'm showing for a simple equation, y = sin(W*x), where W is a parameter and x is an independent variable.

Step-1 Create two lists, one for the parameter (parameter-1 is as W in this case), and other for variable x. Make a loop using the parameter-1 list as iterator and x-values as an input list, enter image description here

Step-2 Make a group node (Equation) for y = sin(W*x) equation which later helps you to easily replace with another equation if you want. I'm converting x and resultant y list into a vector list and as output from the group node. enter image description here

Step-3 Then add this group node into the Parameter Loop which we created in the step-1, and you view the output vector with 3D viewer Node. enter image description here

Step-4 Last step to convert group node vectors to splines (curves) using "Splines Form Points" node and then as output from the parameter loop. Use the Curve Object Output node to convert splines to a curve object which you can render. enter image description here

$\endgroup$
  • $\begingroup$ Thanks!! for the help I ran into a couple problems with your step-3 answer. Nodes are either automatically being added for me or options are missing. I updated my question to add an animation to show what it's doing. Any ideas how to fix this? $\endgroup$ – Rick T May 19 at 17:43
  • 1
    $\begingroup$ 1) Parameter-1 is a Float value but not a Float List, you are connecting float list to float that is why list node pops up. 2) Click on "+ New Generator Output" of Parameters Loop node and search for Vector List, then connect the Vector List of Group Node. $\endgroup$ – 3DSinghVFX May 19 at 19:05
  • $\begingroup$ Thanks!!! that did it :-) $\endgroup$ – Rick T May 20 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.