make_bodies   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/core/nbody_lang_shootout.xtm

Implementation

(bind-func make_bodies
  (lambda ()
    (let ((bodies:planet* (halloc 5))
          (sun:planet* (pref-ptr bodies 0))
          (jupiter:planet* (pref-ptr bodies 1))
          (saturn:planet* (pref-ptr bodies 2))
          (uranus:planet* (pref-ptr bodies 3))
          (neptune:planet* (pref-ptr bodies 4)))
      (tfill! sun 0.0 0.0 0.0 0.0 0.0 0.0 (* 1.0 solar_mass))
      (tfill! jupiter
              4.84143144246472090e+00
              -1.16032004402742839e+00
              -1.03622044471123109e-01
              (* 1.66007664274403694e-03 days_per_year)
              (* 7.69901118419740425e-03 days_per_year)
              (* -6.90460016972063023e-05 days_per_year)
              (* 9.54791938424326609e-04 solar_mass))
      (tfill! saturn
              8.34336671824457987e+00
              4.12479856412430479e+00
              -4.03523417114321381e-01
              (* -2.76742510726862411e-03 days_per_year)
              (* 4.99852801234917238e-03 days_per_year)
              (* 2.30417297573763929e-05 days_per_year)
              (* 2.85885980666130812e-04 solar_mass))
      (tfill! uranus
             1.28943695621391310e+01
             -1.51111514016986312e+01
             -2.23307578892655734e-01
             (* 2.96460137564761618e-03 days_per_year)
             (* 2.37847173959480950e-03 days_per_year)
             (* -2.96589568540237556e-05 days_per_year)
             (* 4.36624404335156298e-05 solar_mass))
      (tfill! neptune
              1.53796971148509165e+01
              -2.59193146099879641e+01
              1.79258772950371181e-01
              (* 2.68067772490389322e-03 days_per_year)
              (* 1.62824170038242295e-03 days_per_year)
              (* -9.51592254519715870e-05 days_per_year)
              (* 5.15138902046611451e-05 solar_mass))
      bodies)))


Back to Index

Similar Entries

  • CV_MAKE_TYPE    xtlang
  • aiProcess_MakeLeftHanded    scheme
  • cl:make-list    scheme
  • cvMakeColour    xtlang
  • glfw_make_context_current    xtlang
  • impc:ir:compile:make-closure    scheme
  • impc:ir:compile:make-closureenv    scheme
  • impc:ir:compile:make-env    scheme
  • impc:ir:compile:make-static    scheme
  • impc:ir:compiler:make-array    scheme
  • impc:ir:compiler:make-tuple    scheme
  • impc:ir:compiler:make-vector    scheme
  • impc:ir:make-arglist-str    scheme
  • impc:ir:make-const-string    scheme
  • impc:ir:make-function-str    scheme
  • impc:ir:make-string    scheme
  • impc:ir:make-struct-str    scheme
  • impc:ir:make-struct-str-env    scheme
  • impc:ti:make-array-check    scheme
  • impc:ti:make-tuple-check    scheme
  • impc:ti:make-vector-check    scheme
  • impc:ti:nativef-generics-make-gtypes-unique    scheme
  • init_bodies    xtlang
  • make-bezier    scheme
  • make-envelope    xtlang
  • make-environment    macro
  • make-instrument    macro
  • make-list    scheme
  • make-list-with-proc    scheme
  • make-metre    scheme
  • make-metro    scheme
  • make-rhythm    scheme
  • make-timeline    scheme
  • make-vector-with-proc    scheme
  • make_instrument    xtlang
  • make_instrument    xtlang
  • make_mono    xtlang
  • make_static_scheme_wrapper_ir    scheme
  • make_window_transparent    xtlang
  • match-result:make    scheme
  • matcher:make    scheme
  • my-inc-maker    xtlang
  • my-inc-maker-wrapper    xtlang
  • pc:make-chord    scheme
  • pc:make-chord-fixed    scheme
  • plet-make-bindings    scheme
  • sys_dir_make    xtlang
  • sys_dir_make_recursive    xtlang
  • xtm_make_model    xtlang