This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; differences from scheme unfold | |
;; even initial value is lazy | |
;; predicate sense reversed | |
;; internal state == produced value, no special mapper-fn | |
;; no tail-gen | |
(defn series | |
"Produces a sequence of values. | |
`f` is a function that given a value, returns the next value. | |
`continue?` is a predicate that determines whether to produce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Based on the 01_InitRaytracing.cpp example from VkRayTutorials | |
;; Copyright (c) 2018 Adrian Medina | |
(ns vk.ray.tutorials.init-raytracing | |
(:gen-class) | |
(:require | |
[vk.ray.tutorials.util :as util]) | |
(:import | |
(java.nio ByteBuffer FloatBuffer IntBuffer LongBuffer) | |
(org.lwjgl PointerBuffer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns three.demo) | |
(def camera (THREE.Camera. 75 (/ window/innerWidth | |
window/innerHeight) 1 10000)) | |
(set! (.z (.position camera)) 1000) | |
(def scene (THREE.Scene.)) | |
(def geometry (THREE.CubeGeometry. 200 200 200)) | |
(def obj (js/Object.)) | |
(set! (.color obj) 0xff0000) | |
(set! (.wireframe obj) true) | |
(def material (THREE.MeshBasicMaterial. obj)) |