Results 1 to 6 of 6

Thread: [RESOLVED] Sphere from triangles question.

  1. #1

    Thread Starter
    Fanatic Member ThomasJohnsen's Avatar
    Join Date
    Jul 2010
    Location
    Denmark
    Posts
    528

    Resolved [RESOLVED] Sphere from triangles question.

    I am working on making a sphere located at (0,0,0) from triangles in such a way that all triangles have identical size, cover the sphere entirely and are uniformly distributed. This has turned out to be a bit more complex than I initially imagined.
    My current solution will take an icosahedron and use recursive subdivision on edges to turn each triangle into 4 smaller ones (currently 6 steps og subdivision yielding a total of 81920 triangles). This solution, although acceptable, has some annoying inconsistancies - the original points in the icosahedron will have 5 outgoing edges while all other points have 6 causing the triangles near these original points to look somewhat skewed. I can't think of another solution though, which is why I posted this. I don't need a detailed solution; an idea or some thoughts will suffice, since I'm a bit stuck atm. Due to the nature of spheres and triangles, a better solution may not exist, but since this forum has helped me alot in the past, I thought I'd give it a shot.

    Regards Tom
    In truth, a mature man who uses hair-oil, unless medicinally , that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality. (Melville: Moby Dick)

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Sphere from triangles question.

    You might try the game forum, as well, since the problem you describe is one encountered fairly often in 3D rendering. There may even be a common solution, though, considering the shape of heads in some 3D games, it may not be a good solution.
    My usual boring signature: Nothing

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Sphere from triangles question.

    I don't know how to go about doing it, but if you look at a picture of the Missouri Botanical Garden's Climatron structure, it uses hexagons shapes. Since each hexagon can be divided into 6 equilibrium triangles, this may be an approach for you.
    http://commons.wikimedia.org/wiki/Fi...al_Gardens.jpg
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  4. #4
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Sphere from triangles question.

    Spherical tessellation. When I did it, I used an octohedron. You want to look here and when you are trying to texture map it, here.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  5. #5

    Thread Starter
    Fanatic Member ThomasJohnsen's Avatar
    Join Date
    Jul 2010
    Location
    Denmark
    Posts
    528

    Re: Sphere from triangles question.

    Quote Originally Posted by Shaggy Hiker View Post
    You might try the game forum, as well, since the problem you describe is one encountered fairly often in 3D rendering. There may even be a common solution, though, considering the shape of heads in some 3D games, it may not be a good solution.
    I will try that .

    And thank you
    Tom


    Elaboration:
    I am fairly familiar with 3D modeling (have written ray-tracers with physically based illumination models), so a solution involving Hermite or Bezier surfaces or any sort of patch or spline should be manageable. Problem is though, that in 3D modeling the need for evenly distributed equally-sized triangles in an object to be rendered isn't a concern in cases I have come across. As far as I am aware most applications use some sort of basic surface (be it a triangle, a Bezier surface or a spline of sorts) to approximate other general surfaces and objects, and never bother about the distribution or size of the individual sub-surfaces. Or maybe I have just been looking in the wrong places

    #EDIT: Oh my - 2 answers while I wrote this
    The link from Stanav gave me a few ideas that may produce better results.
    The solution from Jenner was great - using a subdivided Octohedron apparently yields a significantly better result than subdividing an Icosahedron. I will try to implement that first.

    Thank you very much guys - knew this forum could help; such brilliant members here!
    Tom
    Last edited by ThomasJohnsen; Sep 16th, 2010 at 03:35 PM.
    In truth, a mature man who uses hair-oil, unless medicinally , that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality. (Melville: Moby Dick)

  6. #6

    Thread Starter
    Fanatic Member ThomasJohnsen's Avatar
    Join Date
    Jul 2010
    Location
    Denmark
    Posts
    528

    Re: Sphere from triangles question.



    Results produced from a octahedron yield similar abnormalities as those produced by an icosahedron (ie. some points have 4 edges whereas others have 6) although they are less obvious to the eye. An approximation of a sphere with hexagons (as Stanav suggested) or a dodecahedron seems like the only viable choices - pity both are difficult to model; will have to wait until tomorrow

    Thanks for the help guys.
    Tom
    In truth, a mature man who uses hair-oil, unless medicinally , that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality. (Melville: Moby Dick)

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