coda

01-08-2004, 04:24 PM

I want to join 2 points together such that it forms a 1/4 arc of a circle. Which opengl command can do this? Or can only specify point by point on the arc?

View Full Version : drawing a 2D arc

coda

01-08-2004, 04:24 PM

I want to join 2 points together such that it forms a 1/4 arc of a circle. Which opengl command can do this? Or can only specify point by point on the arc?

chowe6685

01-08-2004, 06:40 PM

no command does this specifically, use a line strip and specify point by point

coda

01-08-2004, 08:18 PM

how close should i specify the points to be?I came across some sample using bezier points to show a curve surface, which method is more suitable?

Acutally, I want to draw a 2D polygon that has 3 square corners and the last corner is rounded (exactly like 1/4 of a circle arc). so i am having difficulty in drawing the rounded corner and joining these corners together as a filled polygon.

[This message has been edited by coda (edited 01-08-2004).]

Acutally, I want to draw a 2D polygon that has 3 square corners and the last corner is rounded (exactly like 1/4 of a circle arc). so i am having difficulty in drawing the rounded corner and joining these corners together as a filled polygon.

[This message has been edited by coda (edited 01-08-2004).]

p_tayal

01-08-2004, 10:17 PM

Either use GLU func: gluPartialDisk()

OR

Look into this website

http://lists.wxwindows.org/archive/wxPython-users/msg03292.html

where the methos given is as follows.

# calculate 3D points for a steps-segment 2D arc from start through stop

from Numeric import *

start = 0.0

stop = pi

steps = 256

angles = arange( start, stop, (stop-start)/steps, 'd')

xes = cos(angles)

yes = sin(angles)

totals = zeros( (len(angles),3),'d')

totals[:,0] = xes

totals[:,1] = yes

Originally posted by coda:

how close should i specify the points to be?I came across some sample using bezier points to show a curve surface, which method is more suitable?

Acutally, I want to draw a 2D polygon that has 3 square corners and the last corner is rounded (exactly like 1/4 of a circle arc). so i am having difficulty in drawing the rounded corner and joining these corners together as a filled polygon.

[This message has been edited by coda (edited 01-08-2004).]

OR

Look into this website

http://lists.wxwindows.org/archive/wxPython-users/msg03292.html

where the methos given is as follows.

# calculate 3D points for a steps-segment 2D arc from start through stop

from Numeric import *

start = 0.0

stop = pi

steps = 256

angles = arange( start, stop, (stop-start)/steps, 'd')

xes = cos(angles)

yes = sin(angles)

totals = zeros( (len(angles),3),'d')

totals[:,0] = xes

totals[:,1] = yes

Originally posted by coda:

how close should i specify the points to be?I came across some sample using bezier points to show a curve surface, which method is more suitable?

Acutally, I want to draw a 2D polygon that has 3 square corners and the last corner is rounded (exactly like 1/4 of a circle arc). so i am having difficulty in drawing the rounded corner and joining these corners together as a filled polygon.

[This message has been edited by coda (edited 01-08-2004).]

fl poly

01-09-2004, 05:18 AM

I think Bezier curves would be a more suited way to draw any arcs and point by point drawing is more rational I think. Don't know much about BC so i could give you an advice with point by point.

All is simple trigonometry. As far as I remember <:

All is simple trigonometry. As far as I remember <:

Powered by vBulletin® Version 4.2.5 Copyright © 2018 vBulletin Solutions Inc. All rights reserved.