www.whyville.net Jul 10, 2016 Weekly Issue



Thinmin12
Guest Writer

How to Program: Sphere

Users' Rating
Rate this article
 
FRONT PAGE
CREATIVE WRITING
SCIENCE
HOT TOPICS
POLITICS
HEALTH
PANDEMIC

Hello all computer nerds or people who just wanted to read this! This past high school year I was in a programming class as an elective, and I've finally learned how to do some basic coding, and I'd like to share what I've learned through different articles!

Today, we are doing a basic sphere.

For the first step, you need to title your program with your name, the date you started and finished, and what you named it.

Second, we need to set our graphics. This will make our code set up the window our sphere is in to be the size we need. We also make a constant so our window will close when we use the Escape key.

Third, we need to see the sphere. We need to add a camera and position it to the middle of our screen. Then we add the light because that makes the sphere visible.

Fourth, we need to create our sphere using the code "CreateSphere()", then we need to position it will be in the cameras view. We will not be adding color or texture yet, so it'll stay white.

Finally, we need to write the code to make our code run. We need the code to tell the program not to close out until we press the Escape Key, which is why we set the constant. Then we need to render the world the sphere will be in, and flip it so it's facing the camera. We end the function "While" by using "Wend" and then End the program.

And that's our program!

Author's Note: I used Blitz3D, which is the program I use frequently and used all through the past year of high school. The book I'm using to help me through some coding is "3D Game Programming for Teens Second Edition"

 

Did you like this article?
1 Star = Bleh.5 Stars = Props!
Rate it!
Ymail this article to a friend.
Discuss this article in the Forums.

  Back to front page


times@whyville.net
15123