arc help

Started by
2 comments, last by Zakwayda 16 years, 2 months ago
given two points (x1,y1) and (x2,y2) , how to draw a arc between them in opengl
Advertisement
Depends on what you want it to look like. There are an infinite number of arcs between two points. You would really need a third point for your question to make sense.
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
any arc will do
i just wanna connect the two points with an arc
let center be ((x1+x2)/2 , (y1+y2)/2 )
Quote:Original post by asdfwe
any arc will do
i just wanna connect the two points with an arc
let center be ((x1+x2)/2 , (y1+y2)/2 )
It looks like you have the center figured out, and the radius is just |p1-p2|/2.

How to draw a circle in OpenGL (and other APIs) has been covered quite a few times on these forums, so I'd try searching the archives for 'OpenGL circle', or something of that sort. Then, just draw half of it :)

This topic is closed to new replies.

Advertisement