Activity › Forums › Adobe After Effects Expressions › 3D curves and surfaces mathematically defined
-
3D curves and surfaces mathematically defined
Kalleheikki Kannisto replied 7 years, 3 months ago 2 Members · 31 Replies
-
Kalleheikki Kannisto
April 8, 2019 at 1:38 pmYes, with Particular. There seems to be some limit, around 26000 particles, above which the figure doesn’t really change, meaning you can’t get the points closer to each other than this. But it may be possible to handle it by modifying the formula itself.
One important factor is to make sure that most of the velocity and emitter size related settings are at zero so that the particles don’t start flying around.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 8, 2019 at 4:59 pm… strange, I don’t get the whole curve. In fact, just a tiny piece of it.
I created a solid and applied Particular to it.
Particule life : thisComp.frameDuration
Part/sec : 30 000
Velocity and associated parameters : 0
Emitter size: 1
Emitter type : lightsI created a point light named Emitter.
I put you code in its Transform.positionI keep on searching … I guess 4 hours is not enough to master Particular …
13255_quantum3dwithparticularkalleheikki.aep.zip
-
Kalleheikki Kannisto
April 8, 2019 at 7:12 pmPosition subframe should be set to “exact”, that way Particular will calculate subframe particle positions accurately.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 9, 2019 at 12:10 am -
Kalleheikki Kannisto
April 9, 2019 at 9:33 amNot sure what is different, so here’s my project file you can investigate.
By the way, I’m pretty sure this isn’t set up how it is supposed to be. I have lambda changing from 0 to 30 in each frame and time changing in steps along the timeline. But at least it gives a curve of some kind.
It should be possible to trace a surface over time if this was set up differently, i.e. t going from 0 to 10 each frame and lambda changing over time and having the particles persist, rather than last for just one frame.
Since I don’t know how this is actually supposed to look, this is conjecture.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 9, 2019 at 2:08 pmGreat,
In my code, there was an inversion between the 2 parameters. The valid code is below where …
– T is the time passing and causing the animation and
– s is the parameter that draws the curve.The result is very promising.
One thing though :
I couldn’t increase the number of dots.
Increasing the number of particles did nothing but superpose the old ones with new ones … It is as if there was a limitation in time definition.
Is it the case ? … I wonder if it can be changed.Thanks a lot … This is going to be useful.
fps = 1/thisComp.frameDuration;
cur_frame = time*fps;T = Math.floor(fps*time)/fps/100;
s = cur_frame%1*10;x= 100*Math.exp(-(s-5)*(s-5)*T)*Math.cos(20.01*s+T*450);
y = 100*Math.exp(-(s-5)*(s-5)*T)*Math.sin(20.01*s+T*450);
z = 50*s-150;
[x,y,z] -
Kalleheikki Kannisto
April 10, 2019 at 4:27 am[Nicolas Guionnet] “I couldn’t increase the number of dots.”
Same here. It could be the Math.floor statement. I thought I had some logical reason to put it in, but maybe it is unnecessary. You can try it without.
Or then it is a limitation in math accuracy, considering all points are getting drawn in within a single frame. In which case the formula itself will need to be modified, or possibly the frame rate decreased to allow for more accurate calculation. You could make it 1 fps, output as frames, and import as footage into a new comp.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 10, 2019 at 8:28 amRight !
4 fps :
2 fps :
… and there we see, finally, the particle moving in its quantum wave. Nice.
I would be surprised if it was the math accuracy considering the number of digits delivered by AE when I display a value in a Text Layer.
But these days, I am surprised 10 times a day …Now i try to evaluate the [ output as frames, and import as footage into a new comp ] process in term of feasibility.
Tweaking the code could be another option …
Thanks
-
Kalleheikki Kannisto
April 11, 2019 at 7:27 amGoody — that did it. Looking very nice.
(Did you also try removing the Math.floor from the expression?)
Next step might be making the particles persist longer, which would — if the formula is suitable — create surfaces over time.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 11, 2019 at 3:17 pmWell, removing Math.floor() had no effect.
But choosing 4fps and even more with2 fps increased dramatically render time.
Increasing, particle life produces indeed a surface. But it seems hard to control.
And to get more control, I am on my way to use Blender script to produce OBJs and import theme into Trapcode or Stardust …
Reply to this Discussion! Login or Sign Up





