On the x axis, the bounds are from -1 to 1. For further info see
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/QuartzComposerUserGuide/qc_concepts/chapter_2_section_5.html
.xX
On Nov 4, 2008, at 3:20 PM, Johnson, Mark P. - Duluth wrote:
The screen in Quartz is actually 2 to –2.
Sounds like you just want the cursor to stay within the screen, so
that anything greater than two, or less than –2 will stay at the
limits.
I don’t know exactly what your data looks like coming in —
Chistopher Wright was using;
“2 * x – 1”
>> so it sounds like the assumption here is that it’s 0 to 1.0 float
values. The math works because multiply here would happen first, but
I like Parenthesis anyway;
(2* x) -1
That will get you the right values for position in Quartz.
But you may want to use a standard math patch with limits or just
use min and max in the Math Expressions patch like so;
Min (2, Max (-2 , ((2 * x) - 1)))
>> And I hope everyone voted...
i am new to .qtz so i apologize if this sounds daft. i am trying to
scale a
incoming float range [0.0.] => [1.0] to [-1.0] =>[1.0]
i know there has to be an easy way to do this with a numeric patch.
i have
tried "range" and "math" which seem like they would be the answer
but am not
getting the right results.
there may be another solution, so i will explain what i am doing.
i am taking multi touch cursor events from an ipod via osc or udp
through
the tuio plugin. im unpacking my "xpos" and "ypos" to draw things on
the
screen etc... and im trying to calibrate my ipod screen to my .qtz
view.
well my screen i guess = 2.0 so i want a range from -1.0 to 1.0 for at
leaste one of my postions. i use oscemote from my ipod.
thanks
Dustin O'Connor
http://numedia-sci.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20081104/61884b8d/attachment.html
------------------------------
_______________________________________________
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/asabatelli%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]