[vtkusers] Basic polygon/sphere rendering question

Johnson, Michael L. micjohnson at northropgrumman.com
Tue Jan 28 16:46:08 EST 2003


> OK, it's time for VTK 101 again!  I have a very simple case.  I am trying
> to draw a polygon on the surface of a sphere. (For my example, let's just
> assume a triangle, but it could be anything.)  Let's say that I have 3
> points in spherical coordinates.  Using the great circle algorithm, I can
> create points along lines that connect those 3 points also in spherical
> coordinates.  I then convert these to x-y-z coordinates.  When I use VTK
> to generate a polygon from these points, the outside edges look like they
> will track the shape of the sphere nicely; however, the interior does not
> -- it basically curves in on itself.  This seems OK to me, since VTK would
> have no way to infer the geometry of the "warped" triangle from just the
> edge points in 3d space.  So I guess I am at a basic VTK/geometry point
> that my head can't bend itself around.  I can partially think of some
> different ways this might be accomplished, but I can't follow any of them
> through to completion, so I am looking for help on this, or perhaps a
> sample or two.  For example, I was thinking that maybe I could do
> something like create a poly data with all of the points in 2d space, and
> then somehow use VTK to generate geometry that represents the triangle,
> then somehow warp that against a sphere equation.  I just don't know what
> the best approach would be here.  Any help would be appreciated!!!
> 
> Thanks,
> Mike Johnson
> 



More information about the vtkusers mailing list