Skip to content

Commit

Permalink
Noch eine Kugel
Browse files Browse the repository at this point in the history
  • Loading branch information
kantel committed Feb 22, 2017
1 parent b08bb49 commit b26bdd7
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 0 deletions.
Binary file added docs/images/earth.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docs/kugel02.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,35 @@ def draw():
a += 0.01
shape(globe)
~~~

## Und noch eine Textur

[![Die Erde](images/earth.jpg)](https://www.flickr.com/photos/schockwellenreiter/32901118862/)

Und hier noch einmal die Erdkugel mit einer anderen Textur, die ich [hier gefunden](http://www.inf-schule.de/information/informationsdarstellungxml/darstellunginformation/fallstudie_3dgrafiken/exkurs/farben) habe. Schaut man genau hin, entdeckt man, daß die Erde an der Datumsgrenze einen Riß aufweist -- ein Phänomen, daß ich hin und wieder schon beobachtet, für daß ich allerdings bis jetzt noch keine Erklärung habe.

Der Quellcode wurde nur geringfügig geändert, aber der Vollständigkeit halber hier noch einmal:

~~~python
a = 0

def setup():
global globe
earth = loadImage("earth.jpg")
size(400, 400, P3D)
noStroke()
globe = createShape(SPHERE, 160)
globe.setTexture(earth)

def draw():
global a, globe
background(51)
lights()
translate(width*.5, height*.5, 0)
# sphereDetail(120)
with pushMatrix():
rotateX(radians(-25))
rotateY(a)
a += 0.01
shape(globe)
~~~
Binary file added ressources/globe/earth.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sketches/kugel03/data/bluemarble.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sketches/kugel03/data/earth.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions sketches/kugel03/kugel03.pyde
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
a = 0

def setup():
global globe
earth = loadImage("earth.jpg")
size(400, 400, P3D)
noStroke()
globe = createShape(SPHERE, 160)
globe.setTexture(earth)

def draw():
global a, globe
background(51)
lights()
translate(width*.5, height*.5, 0)
# sphereDetail(120)
with pushMatrix():
rotateX(radians(-25))
rotateY(a)
a += 0.01
shape(globe)
2 changes: 2 additions & 0 deletions sketches/kugel03/sketch.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mode=Python
mode.id=jycessing.mode.PythonMode

0 comments on commit b26bdd7

Please sign in to comment.