jdl at xdv.org
Mon Feb 4 16:46:21 CET 2002
yep, that helped, thanks.
here is a version of the resulting patch:
it uses the grid object to define the position.
and you need this here as well, sorta compatibiltyobject to max: scale
like <scale from-min from-max to-min to-max>
in case anyone's interested
Shahrokh Yadegari about Re: [PD] cartopol / Yesterday
|The syntax of expr is very close to that of the C language. The upchar '^'
|for expr does not mean to the power of, it is the 'exclusive or' operator.
|You can use the following expressions to translate from rectangular
|to polar coordinates:
|magnitude: expr sqrt($f1*$f1+$f2*$f2)
|phase: expr atan2($f2, $f1)
|(Replace $f to $v, if you are using expr~ for signals)
|atan2() works better than atan() because if you use atan($f2/$f1) you have
|to do some checking for the case of $f1==0 and figure out the correct
|phase based on the signs of $f1 and $f2. Also make sure that the y value
|($f2) is passed to the expr object prior to the x value ($f1), otherwise
|you will not get the correct result.
|Hope this helps,
|On Sun, 3 Feb 2002, [ISO-8859-1] _-¯-_ wrote:
|> does anyone have a cartesian to polar conversion object, preferably
|> compatible to max "cartopol"?
|> also i m askingmyself wether cartopol is the same as rectopol.
|> i tried it with
|> expr ($f1 ^ 2 + $f2 ^ 2) ^ .5
|> for radius and
|> expr tan ^ -1 ($f2/$f1) (this doesnt really work like this in expr)
|> for the angle, according to some cheesy equation i got off the net but
|> it sort of gives different results from the max version.
|> > < Þ V · o r g
X D u · 0 r g
More information about the Pd-list