Jump to content
  • Advertisement
Sign in to follow this  

drawing a rotated circle

This topic is 3962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to draw a circle, with radius r it's center (xyz) and it is laying on a plane with normal (nx, ny, nz), i've got it managed somehow, but sometimes it totally get screwed up: gl.glBegin(GL.GL_LINE_LOOP); for( int i = 0; i < NUM_LINES; i++){ float angle = (float) Math.toRadians(i * 360 /NUM_LINES); verts = Vector3.RotatePointAroundVector( radius, 0, 0, direction.getX(), direction.getY(), direction.getZ(), angle); verts.add(center); gl.glVertex3fv(verts.data, 0); } gl.glEnd(); here is the code what am i doing wrong Paul

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!