Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Expression for Making Something Travel in an Oval?

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Expression for Making Something Travel in an Oval?
by Mark Walczak on Jul 20, 2009 at 6:34:06 pm

Hey everyone,

I was wondering if someone could point me in the right direction to creating an expression that would cause a layer to move in a 2D oval path. I have exhausted such options as pasting an oval mask into the position of said layer, but it really doesn't give me the control I want. Essentially, my dream expression would have:
- X-radius width adjustments
- Y-radius height adjustments
- a link to a slider control where I can control the revolutions from zero to 1,2, etc.

Any ideas? Let me know if I need to clarify...

PS - I also tried Andrew Kramer's 3D Orbit tool, but it only supports circles, not ovals...

What makes you explode?
www.explosivegraffix.com


Respond to this post   •   Return to posts index

Re: Expression for Making Something Travel in an Oval?
by Dan Ebberts on Jul 20, 2009 at 7:15:19 pm

Try this, with slider control "a" for the radius in the x direction, slider control "b" for the radius in the y direction, and an angle control:

a = effect("a")("Slider");
b = effect("b")("Slider");
angle = effect("Angle Control")("Angle");

center = [thisComp.width,thisComp.height]/2;
rads = degreesToRadians(angle);
center + [a*Math.sin(rads),b*Math.cos(rads)]



Dan



Respond to this post   •   Return to posts index

Re: Expression for Making Something Travel in an Oval?
by Mark Walczak on Jul 20, 2009 at 7:33:41 pm

Dan,

I believe I've said it before, but I'll say it again: YOU ARE AMAZING!!!

Thank you so much - you've saved me a precious hour of messing around with Java. I hope to learn it more in-depth soon!

Best,



What makes you explode?
www.explosivegraffix.com


Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]