Solved

Opengl drawing

Posted on 2004-04-21
5
1,369 Views
Last Modified: 2012-06-27
Hi,

Does anyone know a trick to draw a bent cylinder (3D arc) in openGL?
Is it implemented in the glu library? it not, can you help me find the function online?

Thanks
0
Comment
Question by:gamesdev
  • 2
  • 2
5 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10887836
nehe.gamedev.net

Tutorial 18 will show you how to draw a whole sphere, tutorial 26 will show you how to clip out part of it ... End result, a 3D arc
0
 
LVL 1

Author Comment

by:gamesdev
ID: 10890602
Hi sunnycoder,
The stencil buffer clipping will not result in an arc, also it's not reliable when it comes to drawing tens of them.

Thanks.
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 50 total points
ID: 10896609
If drawing and clipping does not appeal to you, then only option I can think of (I am no openGL expert) is to draw the points on the arc and connect them as triangles
0
 
LVL 2

Assisted Solution

by:timbauer
timbauer earned 50 total points
ID: 10906377
I am really unfamiliar with opengl, but can you use splines in 3-dimensional meshes?
That is to say, any quadratic or cubic parametric equation to connect two points given
control points. I have seen in done in 2D, but was not sure if it is practical in 3D. Seems
like many many little triangles are what get used.

-T

0
 
LVL 1

Author Comment

by:gamesdev
ID: 10907079
Hi,
I was trying to avoid writing that function, guess I have no other choice now!
Thanks for your time, guys!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
logging Access violation 6 19
stack 22 163
In C, why can't I shift a 64-bit integer more than 32 bits? 13 220
How to build c program using make in mingw environment? 9 61
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now