Results 1 to 2 of 2

Thread: drawing a sphere

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    2

    drawing a sphere

    Consider a point in 3D <x,y,z> as origin . I want to draw an ellipse for that I need to get <x',y',z'> coordinates given some radius .

    Can any one write a function or give some mathematical equations for these.

  2. #2
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: drawing a sphere

    Quote Originally Posted by shiva kiran
    Consider a point in 3D <x,y,z> as origin . I want to draw an ellipse for that I need to get <x',y',z'> coordinates given some radius .

    Can any one write a function or give some mathematical equations for these.
    The equation of an ellipse with origin at (x,y,z) is

    [(x' - x)/a]2 + [(y' - y)/b]2 + [(z' - z)/c]2 = 1

    where a, b and c are the semiaxes. If you make a = b = c = r (radius) then the eqution simplifies to the case of a sphere:

    [(x' - x)/r]2 + [(y' - y)/r]2 + [(z' - z)/r]2 = 1

    or

    (x' - x)2 + (y' - y)2 + (z' - z)2 = r2
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width