Diamond (2021)

Author's sample script, wroks, hints.
Post Reply
User avatar
3DfromNULL
Site Admin
Posts: 43
Joined: 2018-Jul-13 9:35

Diamond (2021)

Post by 3DfromNULL » 2021-Apr-23 7:33

This script generates a 3D model of diamond cut like the image below;

Image

There might be several ways to make it in a trueSpace scene; e.g. boolean operations, putting vertices together, generating a polyhedron, etc. In the example, we use adding edge by PolyhMakeEdge() and separating polyhedra by PointsSeparate().

At the first, the script creates a cone with 16 longitudes in the scene (i.e. it's a 16-sided pyramid).

Image

Turns it upside down, and sweeps the new top face upwards twice.

Image

Scales down the uppermost (i.e. new top) face.

Image

Adds diagonal edges in the faces just below the top vertices, and adds edges between next to next vertices on the top.

Image

Selects the 3 faces surrounded by the 3 new edges just added.

Image

The 3-face block can be separate from the object as a trigonal pyramid using PointsSeparate(). A face is added to each object. The script delete the trigonal pyramid and repeats the same operation for other top vertices.

Image

Though you might feel it is an easy process, the script takes efforts to find each face or vertex.

The author added lights and materials to the generated scene by hand, and rendered as below.

Image
Image



Requirement: ptsxpy version 0.0.12
Apr 30 2021 edited: Supported tS4.3 at diamond1b.py. (After a message box appeared, please click "Point Edit" button BEFORE close it in case of tS4.3)
Image Image
Image Image Image Image Image
Attachments
diamond1b.py
script file
(8.99 KiB) Downloaded 100 times

Post Reply