Skip to content

Commit

Permalink
Add more models for unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Feb 20, 2024
1 parent f5b357a commit bd351a4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
57 changes: 57 additions & 0 deletions models/hi.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# The letters 'hi' in the upper-right quadrant
_0 var-y
_1 const 0.55
_2 sub _0 _1
_3 neg _0
_4 max _2 _3
_5 var-x
_6 const 0.825
_7 sub _5 _6
_8 max _4 _7
_9 const 0.725
_a sub _9 _5
_b max _8 _a
_c const 0.7
_d sub _0 _c
_e square _d
_f const 0.775
_10 sub _5 _f
_11 square _10
_12 add _e _11
_13 sqrt _12
_14 const 0.075
_15 sub _13 _14
_16 min _b _15
_17 const 0.275
_18 sub _0 _17
_19 max _3 _18
_1a sub _5 _1
_1b max _19 _1a
_1c const 0.45
_1d sub _1c _5
_1e max _1b _1d
_1f min _16 _1e
_20 const 1
_21 sub _0 _20
_22 max _3 _21
_23 const 0.1
_24 sub _5 _23
_25 max _22 _24
_26 neg _5
_27 max _25 _26
_28 min _1f _27
_29 max _2 _1a
_2a max _29 _26
_2b sub _17 _0
_2c max _2a _2b
_2d const 0.175
_2e square _18
_2f sub _5 _17
_30 square _2f
_31 add _2e _30
_32 sqrt _31
_33 sub _2d _32
_34 max _2c _33
_35 sub _32 _17
_36 max _34 _35
_37 min _28 _36
13 changes: 13 additions & 0 deletions models/quarter.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# A quarter-circle in the lower-left quadrant
y var-y
x var-x

mxy max x y

y2 square y
x2 square x
r2 add x2 y2
f const 0.5
circle sub r2 f

out max mxy circle

0 comments on commit bd351a4

Please sign in to comment.