star-3dut

Generate meshes of simple geometric shapes
git clone git://git.meso-star.fr/star-3dut.git
Log | Files | Refs | README | LICENSE

commit 15b9d9c742254f4a2c596f7b0b1a1e821a5f896c
parent eb546964a0db89d88d2ce4bd56b27c4083ec07a9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 13 Oct 2017 11:10:10 +0200

Correctly handle the radius of the super shape

Diffstat:
Msrc/s3dut_super_shape.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/s3dut_super_shape.c b/src/s3dut_super_shape.c @@ -95,9 +95,9 @@ s3dut_create_super_shape cos_phi = cos(spherical.phi); sin_phi = sin(spherical.phi); - pos[0] = uv[0] * cos_theta * uv[1] * cos_phi; - pos[1] = uv[0] * sin_theta * uv[1] * cos_phi; - pos[2] = uv[1] * sin_phi; + pos[0] = uv[0] * cos_theta * uv[1] * cos_phi * spherical.r; + pos[1] = uv[0] * sin_theta * uv[1] * cos_phi * spherical.r; + pos[2] = uv[1] * sin_phi * spherical.r; } sshape->type = S3DUT_MESH_SUPER_SHAPE;