Question: Write a function createCylinder(n, len, rad, isCappedBottom, isCappedTop) that creates the geometry of an n -sided open cylinder of radius rad and length len ,
Write a function createCylinder(n, len, rad, isCappedBottom, isCappedTop) that creates the geometry of an n-sided open cylinder of radius rad and length len, centered at the origin and aligned with the y-axis. isCappedBottom and isCappedTop indicate whether the cylinder is capped by bottom and top faces, respectively; if arguments are not supplied, they default to false. Below, the first image's geometry was constructed by the call createCylinder(12, 6, 2) and the second by the call createCylinder(12, 6, 2, true).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
