Solved

Opengl drawing

Posted on 2004-04-21
5
1,367 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Picking random number 8 175
libcurl and C++ - Post JSON Data 8 1,196
How do I install gcc 4.8.4 on a Linux Ubuntu 14.04 machine? 5 1,576
why "." vs "->" 23 119
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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

896 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