Is there are a way to do a transition from one solid to another step by step? i mean if 1 solid is cube and 2 is sphere i want to get some transitional forms, not an animation.

  • This is an interesting problem!

    Most likely there are several approaches that one could take to find transitional forms between a sphere and a cube.  

    I'll just outline one possible approach: the definitions of those two solids do not lend themselves to an easy solution, though. A sphere is the solid enclosed by all points at a specific distance (its radius R) from its center. A cube is a polyhedron enclosed by six squares, with a square being a rectangle with four equal sides and a rectangle being a quadrilateral with right angles (90 degree angles) in all four corners (at minimum forcing opposite sides to be of equal lengths). So, while it is easy to find a point on a sphere (just any random point at distance R from center C will be on the sphere) finding a point on a cube is not quite that easy, depending on the starting point for that exercise. Perhaps, for consistency, we start with the centroid of the cube which is the centroid of its eight corner vertices. If we wanted to keep the volumes of sphere and cube the same (another approach could be keeping the surface area the same), we can calculate where the corner points of the cube would sit in relation to its centroid. Volume of a sphere is V = 4 * PI * (Pow(R, 3) / 3). Volume of a cube is V = Pow(L, 3) with L the length of its edges. Then L = Pow(2, (2/3)) * Pow(PI/3, 3) * R [according to WolframAlpha]. Ultimately this is of reduced relevance for how to create a transitional geometry.

    Because for a sphere it is less relevant where points on it lie, we should define points on the cube that are important for its geometric shape, e.g. the eight corner vertices, and then any number of subdividing vertices on the cube's edges and facets. We can then define the lines connecting the shared centroid and those characteristic points. At distance R on these lines lie points on the sphere. For each line we can now map between the point on the cube and the point on the sphere. This provides us with a shorter line on which we can parametrically move a point which is then the point of the transitional volume.

    We now need to figure out how to establish the boundary of these volumes. One way to achieve that is by defining the points on the cube so that for each face there is a set of points that is structured as an array of points so that it can be used to create a B-spline surface. These surfaces can then be stitched together to a solid. It is easiest to define these points on the cube by a function that iterates through each face and then creates points in form of an array.

    Attached is a script as DGN and as GCT file that shows this approach as an example.

    The video shows the transitional solid in action.

    CubingTheSphere.dgn

    https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/360/CubingTheSphere.gct

       

    Answer Verified By: Mueller 

  • Hi Olena,

    Did you have an opportunity to review my post and the attached scripts?
    Did this help?
    Have you achieved what you wanted to achieve?

    Looking forward to your response,

    Volker