Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![ruo pu koh](https://uploads.teamtreehouse.com/production/profile-photos/97061/micro_Screen_Shot_2013-06-03_at_9.07.14_PM.png)
ruo pu koh
2,669 PointsConfusing example.
There's so many "sphere"s littered throughout the code it's so hard to follow.
In the makeSphere function, we're creating a Sphere called sphere?
Why does a sphere have 3 centers anyway?
1 Answer
![Gwenaël Magnenat](https://secure.gravatar.com/avatar/f9b36b9b7f85090b3719e5b77b114d9f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Gwenaël Magnenat
14,617 PointsI will try to answer with what I understood. In the makeSphere function you create a sphere with the Sphere struct and we return the sphere created at the end of the function to be used in the program. A sphere has 1 center defined by 3 coordinate values in a 3D space (x, y, z). It defines where the sphere is placed. In this example, the center is an array with the 3 values. That's why he defines a pointer that can point to each value of the center array. (ball.center[0], ball.center[1], ball.center[2])
I hope it helps..