Search found 42 matches

by 3DfromNULL
2021-May-01 9:02
Forum: Sample works and scripts by the author
Topic: Alpha helix and Beta sheet (2021)
Replies: 0
Views: 457

Alpha helix and Beta sheet (2021)

Each of these three scripts generates a motif appeared in secondary structure of proteins; (1) a flexible (bendable and elastic) alpha-helix using lathe functions and skeleton (2) a beta-sheet by giving a cylindrical NURBS squared corners (3) a beta-sheet using blending technique of patches. images/...
by 3DfromNULL
2021-Apr-26 7:17
Forum: Tutorials & Tips
Topic: 0120. Tips for importing 2D curves and texts
Replies: 0
Views: 505

0120. Tips for importing 2D curves and texts

Note: This is an example to import a 2D closed curve from Inkscape by hand. There might be other smarter or easier ways. You might think that the 2D editor in trueSpace (tS) is poor and would like to import curves and/or text drawn using other free vector drawing tools like Inkscape in order to swe...
by 3DfromNULL
2021-Apr-26 9:41
Forum: Tutorials & Tips
Topic: 0110. Tips for 3D printing
Replies: 0
Views: 400

0110. Tips for 3D printing

It could be an option to use trueSpace (tS) + ptsxpy if you would like to 3D print your generative models; Accessories (earrings, brooches, bracelets, or parts of them, etc.) that have recurring pattern in them, e.g. twisted waves or nets generated using parametric equations. Ornaments (or parts of ...
by 3DfromNULL
2021-Apr-23 7:33
Forum: Sample works and scripts by the author
Topic: Diamond (2021)
Replies: 0
Views: 491

Diamond (2021)

This script generates a 3D model of diamond cut like the image below; images/myimg/postimg/diamond/1a.jpg 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...
by 3DfromNULL
2021-Apr-21 9:30
Forum: Tutorials & Tips
Topic: 0100. Animation
Replies: 0
Views: 629

0100. Animation

To make an animation of an object in trueSpace (tS) using ptsxpy, we make "time frames" of the object at each of multiple "active time". The code below creates a cube, makes 3 frames of it, and changes its position per each frame. import ptsxpy as p cb1 = p.CreateCube( 1, 2., 2., 2. ) p.SceneAddObje...
by 3DfromNULL
2021-Apr-21 9:28
Forum: Tutorials & Tips
Topic: 0060. Vim syntax highlighting for ptsxpy
Replies: 0
Views: 567

0060. Vim syntax highlighting for ptsxpy

This topic focuses on a text editor Vim. Just for your information if you use other editors. Vim highlighting for ptsxpy scripts The author mainly uses a text editor "Vim" to edit script files. It already has syntax-highlighting for Python, and I added ptsxpy specific highlighting setting to it. ima...
by 3DfromNULL
2021-Apr-20 8:30
Forum: Tutorials & Tips
Topic: 0050. Auxiliary (General Purpose) Functions
Replies: 0
Views: 600

0050. Auxiliary (General Purpose) Functions

The "ptscgp" module provides auxiliary (general purpose) functions for user scripts. These functions are implemented in the ptsxXpysbXX.dll and user cannot change them directly unlike the ptsxpydef1.py. User script can use them by importing ptsxgp (in addition to ptsxpy for most cases). import ptsxp...
by 3DfromNULL
2021-Apr-19 11:21
Forum: Tutorials & Tips
Topic: 0040. Tips for Python novice
Replies: 0
Views: 720

0040. Tips for Python novice

Please read also " Quick Start " page. Comment # This whole line is comment, and ignored by Python interpreter. import ptsxpy as p # from the sharp sign to the new line is also comment # But the sentence written before (i.e. left side of) the sharp sign is interpreted by Python. Indentation In a Pyt...
by 3DfromNULL
2021-Apr-19 8:30
Forum: Tutorials & Tips
Topic: 0030. Predefined Classes
Replies: 0
Views: 749

0030. Predefined Classes

The file "ptsxpydef1.py" (you installed in tsx\ptsx2py\ or tsx\ptsx3py\ folder) defines convenient classes to bridge between your python scripts and tsxAPI (C++) functions. In the previous example , we created a cube. cb1 = p.CreateCube( 1, 2., 2., 2. ) p.SceneAddObject( cb1, e_tsxFALSE ) p.SceneDra...
by 3DfromNULL
2021-Apr-19 2:13
Forum: Tutorials & Tips
Topic: 0020. The first step to manipulate trueSpace using ptsxpy
Replies: 0
Views: 799

0020. The first step to manipulate trueSpace using ptsxpy

First of all, make a text file, rename it to "cube1.py", copy&paste the code below to it. (You can also keep the file extension to ".txt". Changing to ".py" allows to give your text editor a hint to know how to syntax-highlight) import ptsxpy as p cb1 = p.CreateCube( 1, 2., 2., 2. ) p.SceneAddObject...