Advertisement
Guest User

Untitled

a guest
Apr 30th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.44 KB | None | 0 0
  1. type Shape =
  2.     | S of (hf, bbox, inside)
  3.  
  4. type BaseShape =
  5.     | BS of Texture -> Shape
  6.  
  7. let mkSphere radius tex =
  8.     let hf ray =
  9.         let t = //Solve hit
  10.         let normal = //solve normal
  11.         let material = materialFromTexture tex
  12.     let bBox = //make bBox
  13.     let inside p = //make inside function
  14.     S (hf, bBox, inside)
  15.  
  16. let mkBaseSphere r =
  17.     let baseShapeFunc tex =
  18.         mkSphere r tex
  19.     BS baseShapeFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement