
1. Re: Ellipse as Path (With Expressions)
Mylenium Nov 3, 2010 11:44 PM (in response to Bwsab)Should be easy enough.... You just feed your slider as the angle into your ellipse formula using a simple linear(). Then whatever angle you define will drive the center of the circle based on sinus/cosinus.... If you need more specific help, post the code.
Mylenium

2. Re: Ellipse as Path (With Expressions)
AlexCzet Nov 3, 2010 11:50 PM (in response to Bwsab)Are you using masks to create your shapes? Because that could make things harder...

3. Re: Ellipse as Path (With Expressions)
Rick Gerard Nov 4, 2010 8:13 PM (in response to AlexCzet)I'm not exactly clear what you're trying to accomplish but if you have add three Expression Sliders to a layer, name them xSlider, ySlider and speedSlider you can add this expression to the position property to make the layer orbit in an elliptical path around it's original position. in 2D space.
dx = effect("xSlider")("Slider"); dy = effect("ySlider")("Slider"); orbitSpeed = effect("speedSlider")("Slider") * time; value + [Math.sin(orbitSpeed)*dx, Math.cos(orbitSpeed)*dy];
It's a simple mod to make the expression work in 3D. You just need to add a slider called zSlider then use this expression;
dx = effect("xSlider")("Slider"); dy = effect("ySlider")("Slider"); dz = effect("zSlider")("Slider"); orbitSpeed = effect("speedSlider")("Slider") * time; value + [Math.sin(orbitSpeed)*dx, Math.cos(orbitSpeed)*dy, dz];
Or this option which would even be more interesting
dx = effect("xSlider")("Slider"); dy = effect("ySlider")("Slider"); dz = effect("zSlider")("Slider"); orbitSpeed = effect("speedSlider")("Slider") * time; value + [Math.sin(orbitSpeed)*dx, Math.cos(orbitSpeed)*dy, Math.cos(orbitSpeed)*dz];

4. Re: Ellipse as Path (With Expressions)
Rick Gerard Nov 6, 2010 4:56 AM (in response to Rick Gerard)A better way to work this expression is as follows:
s = time * effect("Speed")("Slider"); x = Math.sin(s)*effect("sinX")("Slider"); y = Math.cos(s)*effect("cosY")("Slider"); z = Math.cos(s)*effect("sinz")("Slider"); value + [x, y, z]
A CS5 project file lives HERE.