c# - moving objects around a circle in Opengl -


I am trying to translate almost the OpenGL object in a helical pattern. I can not understand it I know that I have to increase the angle for X, Y, and Z coordinates, but the translation function that I use transfers the object with a translate amount that is specific to the object. I am using Axis, Z on screen and X on right.

  Move the public override zero (Figure fig) {double angle = 0; Double x = radius * math. Cos (angle); Double y = (angle / radius); Double z = radius * math.Syn (angle); Fig. Translation (X, Y, Z); Angle = .5; } Public Zero Translation (Double Fx, Double FI, Double FJ) {translateAmt [0] + = fx; Translate [1] + = fy; Translator AMT [2] + = FJ; }  

Here are two ways that you can contact:

< H1> ProcessHelix in the process

is a bit hard to read but you are able to see the calculations used to get points with the original loop and helix should be there.

2 translations and a rotation

If you do this, changes in the proper order you can get helical speed. This is the order that you are doing in your head:

  1. Keep the object away from the original (like + x) Radius of your helix
  2. Rotate the object around Genesis (Y axis), form circular motion
  3. Translate the object with the Y axis, make helical motions.

In OpenGL, you translate into the backwards, as the previous matrix has been specified, the first that has been applied ... + y (depending on time). Make a move around y (time dependent), and translate it into x.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -