2 Replies - 5111 Views - Last Post: 16 April 2010 - 05:56 AM Rate Topic: -----

#1 naomi_ginger  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 22-February 10

how to draw helix in opengl?

Posted 22 February 2010 - 09:59 PM

hi~

i'm a total newbie to opengl (actually i'm using JOGL)

i want to draw a 3d helix shape in opengl and i am given some coordinates, like:

1: 13.950, 46.145, 31.092
2: 17.092, 44.090, 30.368
3: 19.622, 46.984, 30.495
4: 18.519, 48.062, 34.005
5: 18.566, 44.485, 35.274
6: 21.763, 43.212, 33.547
7: 23.854, 46.177, 32.576
8: 23.120, 48.784, 35.236
9: 22.821, 46.098, 37.943
10: 24.160, 42.547, 38.067 etc.

i must draw the helix shape using those coordinates. these are giving helix like image, but it comes out too edgy and rough. what i have to do must look like the picture attached.

how to make a nice shape using those coordinates? please help :(

i could draw only rough lines with given coordinate so far:


                                gl.glLineWidth(1);
				gl.glDisable(GL.GL_LINE_STIPPLE);
				gl.glDisable(GL.GL_LINE_SMOOTH);
                                gl.glColor3ub((byte)0,(byte)255,(byte) 0);
				gl.glScalef(0.05f, 0.05f, 0.05f); // reduction of object size

				gl.glBegin(GL.GL_LINE_STRIP); 
                                gl.glVertex3f((float)13.950,  (float)46.145,  (float)31.092);

                                  ......

                                gl.glEnd();




Thank you very much in advance :) :D

Is This A Good Question/Topic? 1
  • +

Replies To: how to draw helix in opengl?

#2 williamgeorgegardner  Icon User is offline

  • CEO of GeekTelligence
  • member icon

Reputation: 19
  • View blog
  • Posts: 584
  • Joined: 27-December 09

Re: how to draw helix in opengl?

Posted 23 February 2010 - 05:44 AM

There is no picture attached.
Was This Post Helpful? 0
  • +
  • -

#3 dineshbilla  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-April 10

Re: how to draw helix in opengl?

Posted 16 April 2010 - 05:56 AM

could you send me the code if you've found it.

View Postnaomi_ginger, on 22 February 2010 - 08:59 PM, said:

hi~

i'm a total newbie to opengl (actually i'm using JOGL)

i want to draw a 3d helix shape in opengl and i am given some coordinates, like:

1: 13.950, 46.145, 31.092
2: 17.092, 44.090, 30.368
3: 19.622, 46.984, 30.495
4: 18.519, 48.062, 34.005
5: 18.566, 44.485, 35.274
6: 21.763, 43.212, 33.547
7: 23.854, 46.177, 32.576
8: 23.120, 48.784, 35.236
9: 22.821, 46.098, 37.943
10: 24.160, 42.547, 38.067 etc.

i must draw the helix shape using those coordinates. these are giving helix like image, but it comes out too edgy and rough. what i have to do must look like the picture attached.

how to make a nice shape using those coordinates? please help :(

i could draw only rough lines with given coordinate so far:


                                gl.glLineWidth(1);
				gl.glDisable(GL.GL_LINE_STIPPLE);
				gl.glDisable(GL.GL_LINE_SMOOTH);
                                gl.glColor3ub((byte)0,(byte)255,(byte) 0);
				gl.glScalef(0.05f, 0.05f, 0.05f); // reduction of object size

				gl.glBegin(GL.GL_LINE_STRIP); 
                                gl.glVertex3f((float)13.950,  (float)46.145,  (float)31.092);

                                  ......

                                gl.glEnd();




Thank you very much in advance :) :D

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1