could anyone please help me to create a sphere using triangles?? i've searched a lot but all of them only describe creating a sphere using some library packages
cool_zephyr
7
Junior Poster in Training
Recommended Answers
Jump to PostForget about the programming part for a second. How do you propose to create something curved(sphere) with something that only has straight edges(triangle)? It seems geometrically impossible. Perhaps you are trying to create something "close to" a sphere?
>> all of them only describe creating a sphere using …
Jump to PostJust from a little googling, here is the code in the OpenGL Red Book.
#include <math.h> #define X .525731112119133606 #define Z .850650808352039932 static GLfloat vdata[12][3] = { {-X, 0.0, Z}, {X, 0.0, Z}, {-X, 0.0, -Z}, {X, 0.0, -Z}, {0.0, Z, X}, {0.0, Z, -X}, {0.0, -Z, …
Jump to PostThe first few sections of this page may be relevant.
All 9 Replies
VernonDozier
2,218
Posting Expert
Featured Poster
cool_zephyr
7
Junior Poster in Training
mrnutty
761
Senior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
cool_zephyr
7
Junior Poster in Training
VernonDozier
2,218
Posting Expert
Featured Poster
cool_zephyr
7
Junior Poster in Training
gusano79
247
Posting Shark
cool_zephyr
7
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.