?
Solved

Opengl drawing

Posted on 2004-04-21
5
Medium Priority
?
1,384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses

770 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