Transforming Cube Surface to Spherical Cube Surface (Generating Spherical Cube)

前端 未结 2 597
挽巷
挽巷 2021-01-29 01:16

I have the coordinates of points of an empty cube just like down below:

What I would like to do is transform that cube to something like this:

Ther

相关标签:
2条回答
  • 2021-01-29 01:56

    Probably one of the most popular solutions to this problem is the Catmull-Clark Subdivision Surface Algorithm which is evulated recursively.

    However, that this algorithm "does not approach an actual sphere as a sphere is quadric." Regardless, this algorithm will produce exactly what is in the image you attached. Also note: you would create a simple cube first and then deform it with subdivision, so you would start with 6 faces,

    Example of 0 Degree Subdivision

    and then a first degree subdivision would give you 24 faces,

    Example of 1st degree subdivision

    with each of the corner vertices translated towards the center to begin the spherical shape.

    0 讨论(0)
  • 2021-01-29 02:17

    Draw grids on the faces cube and project every point that you need radially onto the sphere. Assuming the center of the cube at the origin, transform

    (x, y, z) -> (x, y, z) / √(x² + y² + z²)
    
    0 讨论(0)
提交回复
热议问题