Fix cylinder vertex positions
This commit is contained in:
parent
a6b3f313e3
commit
1584297e8e
@ -20,7 +20,7 @@
|
|||||||
for (let p = 0; p < parallels; p++) {
|
for (let p = 0; p < parallels; p++) {
|
||||||
const y = -radius + p * 2 * radius / parallels;
|
const y = -radius + p * 2 * radius / parallels;
|
||||||
for (let m = 0; m < meridians; m++) {
|
for (let m = 0; m < meridians; m++) {
|
||||||
const θ = 2 * Math.PI / meridians;
|
const θ = m * 2 * Math.PI / meridians;
|
||||||
const x = Math.sin(θ) * radius;
|
const x = Math.sin(θ) * radius;
|
||||||
const z = Math.cos(θ) * radius;
|
const z = Math.cos(θ) * radius;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user