# SuperellipsoidsΒΆ

Learning targets

• Construct SuperEllipsoids as 3D Primitives

This example constructs three different superellipsoids. All three are shown in the following figure as seen from the top and the side. They differ in their xy and xz cross-section. In the middle we observe a circular xy cross section and a diamond shaped xz cross section. The other two have identical xz cross-sections but differ in xy cross-sections.

 top view side view

`.jcm` Input File

The `layout.jcm` file contains a Layout3D section indicating the use of 3D primitives. The background is defined first, then the object section with the three objects follows. The `SuperEllipsoid` is determined by its radii in all three coordinate directions and two additional exponents. The primitives `GlobalPosition` and `Rotation` are shared with all 3D primitives.

Note

The radial parameters of the `SuperEllipsoid` are self-explanatory . The `GlobalPosition` refers to the center of the objects.

• layout.jcm [ASCII]

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81``` ```Layout3D { UnitOfLength = 1.0 Extrusion { Objects { Parallelogram { Priority = -1 DomainId = 101 Height = 5.0 Width = 10.0 GlobalPosition = [0.0, 0.0] MeshOptions { MaximumSideLength = 2.0 } Boundary { Class = Transparent } } } MultiLayer { LayerInterface { BoundaryClass = Transparent ExteriorDomainId = 101 } Layer { Thickness = 5 DomainIdMapping = [101 101] } LayerInterface { BoundaryClass = Transparent ExteriorDomainId = 101 } } } Objects { SuperEllipsoid { Name = "SuperEllipsoid1" DomainId = 5 Priority = 1 RadiusX = 1.0 RadiusY = 1.0 RadiusZ = 1.0 ExponentE = 1 ExponentN = 2 GlobalPosition = [0, 0, 2.5] MeshOptions { MaximumSideLength = .2 } } SuperEllipsoid { Name = "SuperEllipsoid2" DomainId = 5 Priority = 1 RadiusX = 1.0 RadiusY = 1.0 RadiusZ = 1.0 ExponentE = 1.5 ExponentN = 0.8 GlobalPosition = [-3.3, 0, 2.5] MeshOptions { MaximumSideLength = .2 } } SuperEllipsoid { Name = "SuperEllipsoid3" DomainId = 5 Priority = 1 RadiusX = 1.0 RadiusY = 1.0 RadiusZ = 1.0 ExponentE = 2.5 ExponentN = 0.75 GlobalPosition = [3.3, 0, 2.5] MeshOptions { MaximumSideLength = .2 } } } } ```