Fix cylinder vertex positions

This commit is contained in:
Brandon Dyck 2022-10-23 12:38:51 -06:00
parent a6b3f313e3
commit 1584297e8e

View File

@ -20,7 +20,7 @@
for (let p = 0; p < parallels; p++) {
const y = -radius + p * 2 * radius / parallels;
for (let m = 0; m < meridians; m++) {
const θ = 2 * Math.PI / meridians;
const θ = m * 2 * Math.PI / meridians;
const x = Math.sin(θ) * radius;
const z = Math.cos(θ) * radius;