GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

PySoy: Fix Sphere Hole

completed by: Samuel Kim

mentors: Amaury Medeiros, Arc Riley, Tony Young, David Czech, Mayank Singh

soy.bodies.Sphere currently renders with a small hole on the Z axis where a few triangles are missing:

[IMAGE http://gci.copyleftgames.org/img/soy_sphere_hole.png]

This image can be generated with the following code:

#!/usr/bin/env python3 import soy from time import sleep client = soy.Client() scene = soy.scenes.Scene() cam = soy.bodies.Camera(scene) cam.position.z = 15 projector = soy.widgets.Projector(client.window, cam) light = soy.bodies.Light(scene) light.position = soy.atoms.Position((-2, 3, 5)) sphere = soy.bodies.Sphere(scene, 1.0) sphere.subdivisions = 1200 sphere.radius = 4.0 sphere.material = soy.materials.Colored() sphere.material.ambient = soy.atoms.Color('red') sphere.material.diffuse = soy.atoms.Color('red') sphere.material.specular = soy.atoms.Color('white') if __name__ == '__main__' : sleep(10)

The code to render a sphere can be found in libsoy/src/bodies/Sphere.gs, its written in Genie and OpenGL.

While working on this task you should join and remain in #PySoy on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen.

When you've done, commit your work and post the resulting changeset url to this task.