GLUTSOLIDSPHERE(3)

πŸ“¦
version 3.8.0 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– GLUTSOLIDSPHERE(3) πŸ’–

okay bestie, gather round, because we're talking about glutSolidSphere(3) from OpenGLUT β€” geometry division, she's iconic, she's serving spheres. ✨


🌸 NAME 🌸

glutSolidSphere β€” draws a solid sphere, and yes she is centered at the origin, no cap. πŸŽ€

πŸ“š LIBRARY πŸ“š

OpenGLUT β€” geometry, babes. that's the department. πŸ’…

✨ SYNOPSIS ✨

#include <openglut.h>

void
glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);

like. that's the whole vibe. one function. three args. go off. πŸ¦‹

πŸŽ€ PARAMETERS πŸŽ€

  • radius β€” the radius of the sphere, obviously. how big we're going. 🌈
  • slices β€” the number of divisions around the z axis. (latitudal) πŸ“
  • stacks β€” the number of divisions along the z axis. (longitudal) 🧚

πŸ’œ DESCRIPTION πŸ’œ

so glutSolidSphere() draws a shaded sphere, and it's centered at the origin β€” main character placement fr fr. πŸ‘‘

the surface is built out of quadrangles (except at the poles, where you get triangles acting as degenerate quads, because the poles are just like that 😭) and it's all laid out in a longitude/latitude pattern. very globe, very demure.

the equatorial great circle lies in the xy-plane and is centered on the origin. she's symmetrical, she's aligned, she ate. πŸ’…

πŸ’€ CAVEATS πŸ’€

the number of polygons representing the spherical surface is proportional to (slices*stacks). so like, don't come for me when your poly count explodes β€” that's just math doing math. not me cranking both numbers and wondering why my GPU is crying. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

  • glutWireSphere(3) β€” the wireframe sister, the see-through icon she is πŸ¦‹

that's the whole page bestie, go draw some spheres and slay πŸ’–

this one's from an UNDATED source, and the footer just says UNTITLED() β€” mysterious, unlabeled, lowkey giving anonymous baddie energy. periodt. πŸ’…βœ¨