#lang 3d-orbit

About this Language

Use this language to create 3D space scenes to explore!

  • Customize stars and planets with textures, rings, and more.
  • Create soloar systems with orbiting planets, moons and asteroids!
  • Add 3D models into your space scene!
  • Let your imagination run wild!
To Install

Package Source: https://github.com/thoughtstem/TS-VR-Languages.git?path=3d-orbit

Need a reminder how to install a package? Check out this video tutorial.


Hello World 1

Code a basic orbit scene.

(orbit-scene)

Hello World 1

Code a basic orbit scene.

(orbit-scene)

Moon And Ring 1

Code an orbit scene with a star center and a planet with a moon.

(define planet-with-moon
 (basic-planet
  #:moons-list (list
                (basic-moon))))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        planet-with-moon)))

Moon And Ring 2

Code an orbit scene with two moons, a planet, and a star. The moons and the planet should have a visible orbit path.

(define my-moons
 (list (basic-moon)
       (basic-moon)))

(define the-planet
 (basic-planet
  #:show-orbits? #t
  #:moons-list my-moons))

(orbit-scene
#:star (basic-star
        #:show-orbits? #t
        #:planets-list (list
                        the-planet)))

Moon And Ring 3

Code an orbit scene with a star center and a planet with two moons. Show the orbit paths for the moons and planet.

(define my-moons
 (list (basic-moon
        #:texture sun-tex
        #:scale 2)
       (basic-moon
        #:label "This moon grows!"
        #:on-mouse-enter (do-many
                          (scale 2))
        #:on-mouse-leave (do-many
                          (scale 1)))))

(orbit-scene
#:star (basic-star
        #:animations-list '()
        #:planets-list (list
                        (basic-planet
                         #:moons-list my-moons))))

Moon And Ring 4

Code an orbit scene with a star center and a ringed planet.

(define planet-with-ring
 (basic-planet
  #:rings-list (list
                (basic-ring))))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        planet-with-ring)))

Moon And Ring 5

Code an orbit scene with a star center and a planet with two rings. Customize the color and opacity of one ring and the texture and tilt of the other ring.

(define my-rings
 (list
  (basic-ring
   #:color 'red
   #:opacity 0.8)
  (basic-ring
   #:texture saturnring-tex
   #:tilt (tilt 90 0 90))))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        (basic-planet
                         #:rings-list my-rings))))

Orbit 1

Code an orbit scene with a star in the center and where you fly faster.

(orbit-scene
#:fly-speed 1000
#:star (basic-star))

Orbit 2

Code an orbit scene with a star center and different-colored universe and stars.

(define my-universe
 (basic-universe
  #:universe-color 'blue
  #:star-color 'orange))

(orbit-scene
#:universe my-universe
#:star (basic-star))

Orbit 3

Code an orbit scene with a star center and large dragon stars.

(define dragon-universe
 (basic-universe
  #:star-size 4
  #:star-texture dragon-image))

(orbit-scene
#:universe dragon-universe
#:star (basic-star))

Orbit 4

Code an orbit scene with a large star center. Move your starting position back.

(orbit-scene
#:start-position (position 0 0 100)
#:star (basic-star
        #:radius 20))

Space Objects 1

Code an orbit scene with a star center. Add three asteroids and customize each.

(define asteroids-list
 (list (basic-asteroid
        #:color 'red)
       (basic-asteroid
        #:opacity 0.7)
       (basic-asteroid
        #:label "Big Rock")))

(orbit-scene
#:star (basic-star)
#:objects-list asteroids-list)

Space Objects 2

Code an orbit scene with a star center and three orbiting asteroids. Customize each asteroid.

(define asteroids-list
 (list
  (basic-asteroid
   #:texture mars-tex)
  (basic-asteroid
   #:radius 0.5)
  (basic-asteroid
   #:on-mouse-click (do-many
                     (opacity 0)))))

(orbit-scene
#:star (basic-star
        #:objects-list asteroids-list))

Space Objects 3

Code an orbit scene with a star center and a planet. Give the planet three orbiting objects: a moon, an asteroid, and an astronaut.

(define my-planet
 (basic-planet
  #:objects-list (list
                  (basic-moon)
                  (basic-asteroid)
                  astronaut)))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        my-planet)))

Space Objects 4

Code an orbit scene with a star center and a planet. Give the planet a small satellite.

(define my-planet
 (basic-planet
  #:objects-list (list
                  (scale-object 0.5 satellite-1))))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        my-planet)))

Space Objects 5

Code an orbit scene with a star center which has an orbiting planet, which has an orbiting moon, which has an orbiting flying saucer.

(define my-moon
 (basic-moon
  #:objects-list (list
                 flying-saucer-1)))

(define my-planet
 (basic-planet
  #:moons-list (list my-moon)))

(orbit-scene
#:star (basic-star
        #:planets-list (list my-planet)))

Star And Planet 1

Code an orbit scene with a planet rotating around a star center.

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        (basic-planet))))

Star And Planet 2

Code an orbit scene with a planet rotating around a star center. Customize the radius, opacity, and color of the planet and star.

(define my-planet
 (basic-planet
  #:radius 5
  #:opacity 0.8
  #:color 'blue))

(define my-star
 (basic-star
  #:radius 5
  #:opacity 0.8
  #:color 'yellow
  #:planets-list (list
                  my-planet)))

(orbit-scene
#:star my-star)

Star And Planet 3

Code an orbit scene with a star center. Change the star's opacity when clicked. Add a planet whose texture changes when you look directly at it.

(define changing-planet
 (basic-planet
  #:texture jupiter-tex
  #:on-mouse-enter (do-many
                    (texture mars-tex))
  #:on-mouse-leave (do-many
                    (texture jupiter-tex))))

(orbit-scene
#:star (basic-star
        #:texture sun-tex
        #:on-mouse-click (do-many
                          (opacity 0.1))
        #:planets-list (list
                        changing-planet)))

Star And Planet 4

Code an orbit scene with a non-moving Sun center. Add an Earth planet which rotates on the y-axis. Add a custom label to both.

(define my-planet
 (basic-planet
  #:label "Earth"
  #:label-color 'blue
  #:texture earth-tex
  #:animations-list (list
                     (y-rotation))))

(orbit-scene
#:star (basic-star
        #:animations-list '()
        #:label "Sol"
        #:label-color 'orange
        #:texture sun-tex
        #:planets-list (list
                        my-planet)))

Star And Planet 5

Code an orbit scene with Earth and Sun to scale. Customize Earth's position and show the orbit path.

(define the-earth
 (planet-earth
  #:position (position 230 0 0)))

(orbit-scene
#:star (star-sun
        #:show-orbits? #t
        #:planets-list (list
                        the-earth)))

Star System 1

Code an orbit scene with the Sun and our first 3 planets. Use the appropriate textures, add labels, and give Earth a moon.

(define the-moon
 (basic-moon
  #:texture moon-tex
  #:label "Luna"))

(define my-planets
 (list
  (basic-planet #:texture mercury-tex
                #:label "Mercury")
  (basic-planet #:texture venus-tex
                #:label "Venus")
  (basic-planet #:texture earth-tex
                #:label "Earth"
                #:moons-list (list the-moon))))

(orbit-scene
#:star (basic-star
        #:texture sun-tex
        #:label "Sol"
        #:planets-list my-planets))

Star System 2

Code an orbit scene with the Sun, Jupiter, and Saturn. Use the appropriate textures, add labels, and give Saturn a ring.

(define the-ring
 (basic-ring #:tilt (tilt 90 0 0)
             #:texture saturnring-tex
             #:radius 2
             #:thickness 0.5))

(define my-planets
 (list
  (basic-planet #:texture jupiter-tex
                #:label "Jupiter")
  (basic-planet #:texture saturn-tex
                #:label "Saturn"
                #:rings-list (list the-ring))))

(orbit-scene
#:star (basic-star
        #:texture sun-tex
        #:label "Sol"
        #:planets-list my-planets))

Star System 3

Code an orbit scene with a unique star system. Add at least 2 custom planets with custom textures and names.

(define my-planets
 (list (basic-planet
        #:texture brick-tex
        #:label "Brick World")
       (basic-planet
        #:texture steel-tex
        #:label "Steel World")))

(orbit-scene
#:star (basic-star
        #:planets-list my-planets))

Star System 4

Code an orbit scene with a unique star system. Add at least 2 custom planets with moons and/or rings.

(define moon-planet
 (basic-planet
  #:moons-list (list
                (basic-moon
                 #:texture black-tex))))

(define ring-planet
 (basic-planet
  #:rings-list (list
                (basic-ring
                 #:texture pink-tex))))

(orbit-scene
#:star (basic-star
        #:planets-list (list
                        moon-planet
                        ring-planet)))

Star System 5

Code an orbit scene with a unique star system. Add at least 2 custom planets and 3 space objects.

(define my-planet
 (basic-planet
  #:texture purple-tex))

(orbit-scene
#:star (basic-star
        #:planets-list (list my-planet
                             my-planet))
#:objects-list (list international-space-station
                     space-shuttle
                     asteroids))