[PD] cartopol

_-¯-_ jdl at xdv.org
Mon Feb 4 16:46:21 CET 2002


yep, that helped, thanks.

here is a version of the resulting patch:
http://barely.a.live.fm/pd/stff/spatzi_4delay.tgz

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>
http://barely.a.live.fm/pd/stff/cxc.xtra/cxc.scale2.pd

in case anyone's interested

Shahrokh Yadegari about Re: [PD] cartopol / Yesterday

 |Hi,
 |
 |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:
 |
 |x: $f1
 |y: $f2
 |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,
 |Shahrokh.
 |
 |On Sun, 3 Feb 2002, [ISO-8859-1] _-¯-_ wrote:
 |
 |>
 |> hu
 |>
 |> 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.
 |>
 |> x.j
 |>
 |> --
 |> >         < Þ V · o r g
 |>
 |>
 |

-- 
X           D           u           ·           0           r           g




More information about the Pd-list mailing list