Links und Funktionen
Sprachumschaltung

Navigationspfad


Inhaltsbereich

ikg.py

ikg.py — text/python-source, 1 KB (1049 bytes)

Dateiinhalt

from visual import *
import Image
import planeten

scene.lights=[]
sys.getsizeof
P = 20

local_light(pos=(P,P,-P), color=color.gray(0.5))
local_light(pos=(-P,P,P), color=color.gray(0.5))
local_light(pos=(P,-P,P), color=color.gray(0.5))
local_light(pos=(-P,-P,-P), color=color.gray(0.5))
local_light(pos=(P,P,P), color=color.gray(0.5))
local_light(pos=(P,-P,-P), color=color.gray(0.5))
local_light(pos=(-P,-P,P), color=color.gray(0.5))
local_light(pos=(-P,P,-P), color=color.gray(0.5))



name = "IKG2048"
width, height = 2048, 1024
im = Image.open(name+".tga")
materials.saveTGA(name,im)
IKGtextur1 = materials.texture(data=im, mapping="spherical")

name = "Werkraum2048"
width, height = 1024*2, 512*2
im = Image.open(name+".tga")
materials.saveTGA(name,im)
IKGtextur2 = materials.texture(data=im, mapping="spherical")

if __name__=="__main__":
    sphere(radius=6, material=IKGtextur1)
    ring(radius=1, material=IKGtextur1)
    arrow(pos=(2,0,0),material=IKGtextur1)
    box(pos=(-2,0,0), material=IKGtextur1)

Funktionsleiste