equation

Jun 22, 2011 at 11:13am

equation

hi

i try to make the equation on the pict.

corresponding to Multiply the x coordinate of each vertex by the y coordinate of the next vertex.

like this : ($1 * $4) + ($3 * $6) + ($5 * $8) + ($7 * $10) + ($9 * $12)

if anyone can help me !
thanks
f

[attachment=164828,2384]

Attachments:
  1. area.tiff
#57716
Jun 22, 2011 at 11:17am

This seems to a perfect task for [expr].

#206851
Jun 22, 2011 at 11:57am

yes sure…. but if i write it on the form : ($i1 * $i4) + ($i3 * $i6) + ($i5 * $i8) + ($i7 * $i10) + ($i9 * $i12) expr don’t work, be in black and max window say $ symbol variable out of range…
i don’t know what kind of operators used or is it necessary to used several expr ?

thanks
f

#206852
Jun 22, 2011 at 12:05pm

like this is ok but maybe tyey are a most effective way ?

– Pasted Max Patch, click to expand. –

thanks
f

#206853
Jun 22, 2011 at 12:12pm

cant’ see your patch here. but the error message is because [expr] takes only up to nine arguments. so you could split the tasks into two expressions or maybe do it in Javascript using a single [js].

#206854
Jun 22, 2011 at 12:21pm

ok

thanks
f

#206855
Jun 22, 2011 at 12:59pm

split it up.

if it is a list, use something like zl iter 2 or zl iter 4, then write an an expr.

#206856
Jun 22, 2011 at 10:33pm

Throw some iteration in there and do the maths:

– Pasted Max Patch, click to expand. –
#206857
Jun 23, 2011 at 11:03am

hi

thanks Luke, this run good and seems me the most efficiently, and can run with different size of list…

all the best
f

#206858
Jun 23, 2011 at 10:09pm

Not a problem, scalability is always good. This way you can change the list length and the offset, happy to help!

#206859

You must be logged in to reply to this topic.