Additionally, for circles and ellipses you can just use two LFO patches. Set one to use a Sin type and connect it to X and the other to use Cos for Y. You can then control the center by changing the offset and the size (radius) by setting the amplitude. If the amplitude isn't the same on both LFOs, you'll get an ellipse.

You can also do a Triangle path with some math on the Timebase and I'm still working out if it is possible to get a square path :)

Troy

On Apr 6, 2008, at 1:32 PM, Christopher Wright wrote:

I would like to make a patch that can move an object around a certain
path -- in my first case, a circle. I'm having trouble figuring out
the best way to do this since there doesn't seem to be any sort of
existing patches that deal with paths. The way I envision using it is
that it based on inputs of a center point (x1, y1) and radius (r), it
will provide outputs (x2, y2) that follow the circumference of the
specified circle at a speed controlled by a variable rate. Is this the
kind of thing I'll have to program in Objective C, or can this be
achieved using the existing patches?

Without knowing more details, I'm pretty sure you can perform this without resorting to writing a custom plugin.

Initially, I'd recommend using the Javascript patch, the Math patch, or the math expression patch. You could also experiment with the Timeline patch too.

The equations for getting the output position would be something like this:

x = r  *cos(theta) + x1
y = r * sin(theta) + y1

Where r is the radius, x1 and y1 are the center points, and theta is the current angle (you could multiply this by the variable rate to change its speed around the circle). Theta should be attached to something like system time, patch time, or the output of some other time-marking patch (stop watch, timeline, etc).

Here's a simple composition that demonstratesthe above:
<CirclePath.qtz>


Hope this helps, let me know if I completely misunderstood what you're trying to accomplish.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to