Graphs

Discussion in 'Plugin Development' started by dlange, Nov 26, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    dlange

    Is it possible to use 3D or 2D graph formulas to get points?

    Example: x*x + y*y = r*r (circle) (and the 3D graph version)

    I can rearrange that in terms of x, y, or r (+ z for 3D graphs), but how could that be implemented, and get all the points on the graph, i want to use this make creating particles and such easier, and you can just spawn them at a Location + the point.
     
  2. Offline

    mcdorli

    for a circle, you want
    x = Math.cos(angle) * r;
    y = Math.sin(angle) * r;

    angle is the degrees in radians.

    You need to increase the angle, and spawn a particle at every x and y value you get,
     
  3. Offline

    dlange

    @mcdorli Ahhh ok, thanks ill take a look
     
Thread Status:
Not open for further replies.

Share This Page