Hi Achim

That's a workaround I'd be proud of coming up with! Essentially I would still have to generate time equations because of the jumps in screen swipe position, relative to elapsed time. The equations may be easier that way, though, I like your lateral thinking.

I'm guessing that's a method you've used successfully on your own projects as a way of pre-rendering complicated graphics and doing an A/ B wipe at low cost.

I'm a bit of a terrier with these sort of problems and if I can't see any logical reason why I can't perform a certain task, I tend to keep biting away at it until I can swallow it. I think I'm close — just one more big session! (I'm switching to Peak8 training anyhow now ;-) ) So I'll try your method next time I get up in the morning and feel like maths and try and find the error of my methods too.

Alastair


On 11/01/2011, at 6:54 PM, Achim Breidenbach wrote:

Hi Alastair,

I think your approach is very complicated, because you have to calculate all those fractions for each box. What about this idea: Render two images with the "Render In Image"-patch which are only the graphics of starting time (showing the full colored background) and the second would be the full elapsed time. Then using a "Swipe Transisiton" patch to mix those images, where the time parameter of that patch has to jump at certain points. In the end you are rendering the output image of the swipe transition with a "Billboard".

The benefits of this is:
- You don't have to calculate all the fractions for each box.
- You can render the two images in beautiful gradients, drop shadows and what ever without having a performance impact because the "render in image" will only happens once you changes size of the screen or your parameter "T".

Maybe this gives you some new ideas...

best,

Achim Breidenbach
Boinx Software

On 11.01.2011, at 05:41, Alastair Leith wrote:

Hi George,

This is probably the most complex example of the need for math expressions over interpolation patch I've got:

5BX is an old exercise routine that has charts of exercises that one progresses through. It always ends with 5 minutes of running on the spot. The amount of running changes depending on the chart and your place on it. So the range is 205 —> 600 total number of steps. In addition every 75 steps, one performs 10 star-jumps. Often there is an odd number of steps (< 75) left to complete the Total Number of Steps.

I wanted to display the running and jumping brackets as discrete bars in a row of bars to show ones progress over time through the sequence of 75 step units, jumps and remaining odd number of steps to complete sequence (if ≠0).

Initially i divided the screen width by the int(Total Steps/75). Allowed for some space between bars. Then I interpolated filling the bars over time. The problem was I always had zero time to left complete the odd number of steps to Total Steps. I then set about defining the problem accurately with (eeck) maths expression patches.

Attached composition is as close as I have so far. It's accurate in pixel terms but elapsed time is not accurately enough calculated as yet for some remainders of (Total_Steps/75). I have a go at improving this every few weeks. I've had a few false dawns and pages of false equations. I still have a false assumption in one or more of my time equations but it's getting close.

If of no other interest, this comp has a handy (tiny) macro that acts as a time scrubber (like a video editing scubber) published to root which is good for debugging composition-time dependant comps.

( cwright et al: I know all comps are intrinsically time dependant, I mean those comps where one may wish to have some interaction with that dependancy but can't find the correct jargon to say that ;-) )

Comp has fairly good notes but any questions are welcome. Correct solution for equations is more than welcome ;-).

<5BX running output macro II.qtz>

Alastair

On 06/01/2011, at 1:57 AM, George Toledo wrote:

Alastair, can you demonstrate interpolation with an abacus for us? :)

Best,
gt

On Wed, Jan 5, 2011 at 9:49 AM, Alastair Leith <qc.student...@gmail.com > wrote: Well when I learnt maths it's was the PDP8 and Apple ][ era and everything was hand-written. The dots I saw (probably from my dad's maths which takes them back another 40 years again) and wrote were all on the baseline and small as in "." But yes with object.property all the rage these days it probably would do to use a•x (even if it looks a little odd to me).


On 05/01/2011, at 7:24 PM, Joshua wrote:

I sometimes use the key command option-8 to create a black dot • as it's centered and doesn't get confused with anything. That's how they taught us back in school.

Best,
Joshua TS

Sent from my iPhone

On Jan 4, 2011, at 9:18 PM, Alastair Leith <qc.student...@gmail.com> wrote:

You're welcome Oscar.

In response to an off-list email I wrote this, (doesn't hurt to share it). Sentence in blue is a correction to first post:

. = *

Mathematicians use it in hand-written equations as a quick sign for 'product' or multiplication.

I tried * (and 'x' would be downright confusing) but it looked messy so I went with '.' — except where there were numbers involved and then it could be confused for a decimal point. eg 5.x or y.5 Of course you could just write y=ax+c but in code that makes ax look like one variable not two.

I should have written at the end of that post, all version 'In- Out', 'In' and 'Out' will require two equations to get the easing in and out, except maybe for sinusoidal 'In-Out' in some cases since it already has a curve that is characteristic of ease-in ease-out if you use the correct half phase of the curve.

Alastair Leith

The machine does not isolate man from the great problems of nature but plunges him more deeply into them.
Antoine de Saint-Exupery

On 04/01/2011, at 11:55 PM, Oscar 'offonoll' wrote:

Interesting! thank you so much!!!!

On Tue, Jan 4, 2011 at 12:54, Alastair Leith <qc.student...@gmail.com > wrote: Each Interpolation has it's own equation (linear, quadratic in, sinusiodal in-out, etc etc)

For linear, the general equation (using x and y since they're familiar) is:

y= a.x + c

For your range mapping [0,1] —> [-1,1], simultaneous equations can quickly tell us the values of a and c:
When x=0,  y=-1 ∴ c= -1 ie, y= a.x -1
For x=1, y=1 so substituting into y= a.x -1,
 1 = a*1 -1
⇔ a=2

So your equation for linear mapping of [0,1] —> [-1,1]
is y = 2.x -1,

Test our formula for x=0.5,
y = 2*0.5 -1
   = 0  ✔  It checks out ok!

Other general equations to use:

y = a(x+b)² +c          [Quadratic] or
y = a.x² +b.x + c       or
y = (x+a)(x+b) + c (Fixed the Typo present in the version I sent you earlier Oscar)
y = a.sin(x+b) +c       [Sinusoidal]
y = cb(x+a) + d         [Exponential] or
y = a.exp(x+b) + c      
y = a.x³ + b.x² + c.x +d        [cubic]

Solving some of these equations can be a bit more involved but mostly not to difficult by substituting in your range limits and mid-point or whatever. These should work for In-Out. In cases of just In or just Out you'll need two equations. One being say quadratic the other linear. Then switch from one equation to the other depending if x is < or ≥ the crossover point. I find Apples Grapher app (Utilities Folder) helps to visualise these equations. Many resources via wikipedia too.

Hope that helps
Alastair


On 04/01/2011, at 9:03 PM, Oscar 'offonoll' wrote:

Hello and happy new year!
I am wondering what is the Interpolation mathematical equation. as I normaly use it to transform a range of 0-1 (position) to my personal range such as -1 to 1.
thank you!!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/qc.student.au%40gmail.com

This email sent to qc.student...@gmail.com





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

This email sent to jsoph...@gmail.com


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

This email sent to gtole...@gmail.com



--
George Toledo
gtole...@gmail.com
www.georgetoledo.com

The information contained in this E-mail and any attachments may be confidential. If you have received this E-mail in error, please notify us immediately by telephone or return E-mail. You should not use or disclose the contents of this E-mail or any of the attachments for any purpose or to any persons.


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

This email sent to ac...@boinx.com


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

This email sent to arch...@mail-archive.com

Reply via email to