Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Howto draws a simple plane and morphs it into a sphere? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
langtudontinh

March 02, 2005, 02:32 AM

Hi everyone,
What I want is to display a plane and morph it into a sphere. Could anyone tell me howto do that, if possiple please give me the sample source code.
Thank you!

 
langtudontinh

March 02, 2005, 04:50 AM

PLEASE PLEASE PLEASE, answer me!

 
Rui Martins

March 02, 2005, 05:32 AM

Look for Spherical Texture Coords Generation

 
Wernaeh

March 02, 2005, 05:40 AM

Hi there =)

>>
What I want is to display a plane and morph it into a sphere
= PolyVert + (SphereVert - PolyVert) * time; where 0 <= time <= 1 Other than that, your question could be a bit more say, specific, as to what you actually want to achieve. Cheers, - Wernaeh

 
Erik Faye-Lund

March 02, 2005, 05:47 AM

I guess you should watch abcdemo a bit less often.

 
langtudontinh

March 02, 2005, 08:40 PM

Exactly, I want to morph from a quad to sphere, but I could not create a quad and a sphere so that they have the same number of vertices & faces.

 
Reedbeta

March 02, 2005, 09:30 PM

All you need to do is parameterize the sphere by latitude and longitude, so the sphere is basically a quad in u-v space (from 0 to 2*pi in u, and -pi to +pi in v). Then just subdivide this large "quad" into however many small quads you want, and you should be able to do the morph painlessly. Note that all the points on the top and bottom edges of the quad will morph to the poles of the sphere.

 
andrewbutts

March 08, 2005, 11:26 AM

Wernaeh:

If you approximate a "plane" by a sphere with extremely large radius, you can turn it into a sphere by just decreasing the radius.

 
This thread contains 8 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.