SetFlat and SetGouraud enable or disable the flat or Gouraud rendering modes.
object.SetFlat(On/Off)
or
object.SetGouraud(On/Off)
Objects in Jamagic can have Gouraud or flat shading (a third type is Lambert shading, which is nearly identical to Gouraud).
Flat shading is not very realistic. It is uniformly bright over the entire object s surface.
Gouraud shading gives a much more realistic and interesting effect in that the brightness of the surface is not uniform.
oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); sphere.SetPosition(0,200,0); mats = New Material(oworld,,RED,"mats"); sphere.SetGouraud(); sphere.ReplaceMaterial(mats); plane = oworld.CreatePlane(600,600); Matplane = New Material(oworld, ,GREEN, "Matplane"); matplane.SetFlat; plane.ReplaceMaterial(matplane); plane.SetAngle(-Pi/2,0,0); plane.SetStatic(); oworld.Optimize(ocamera); ocamera.MoveBack(1200); ocamera.MoveUp(200); sphere.Walk(); sphere.SetShadowMode(Object.SHADOW_MODE_TRUE); sphere.EnableShadow(); //loop While(TRUE);