Geeks3D Forums

GeeXLab => GeeXLab - english forum => Topic started by: JeGX on May 16, 2014, 03:21:24 PM

Title: Mesh PQ Torus Knot demo
Post by: JeGX on May 16, 2014, 03:21:24 PM
GLSL Hacker 0.6.4.1 adds the creation of PQ torus knot. A demo is available in the host_api/Mesh_PQTorusKnot/ folder of the code sample pack.

A gallery of various PQ torus knots is available here:
http://www.geeks3d.com/20140516/pq-torus-knot/

The following code:
Code: [Select]
steps = 1024
facets = 32
scale = 4.0
thickness = 0.5
clumps = 0
clump_offset = 0
clump_scale = 0.0
u_scale = 2
v_scale = 32
P = 3
Q = -7
pqtorus = gh_mesh.create_pqtorus(steps, facets, scale, thickness, clumps, clump_offset, clump_scale, u_scale, v_scale, P, Q)

will create this torus knot:

(http://www.ozone3d.net/public/jegx/201405/glslhacker-pq-torus-knot-p3-m7.jpg)