Skip to content

Commit

Permalink
[types] minor format update bezier ns
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 23, 2015
1 parent 1796f20 commit e00c63d
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions geom-types/src/bezier.org
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,30 @@ required control points. This only works for non-closed curves, though.

(defn auto-spline2
([points]
(->> points
(find-cpoints* vec2 0.25)
(auto-spline* points)
(thi.ng.geom.types.Bezier2.)))
(->> points
(find-cpoints* vec2 0.25)
(auto-spline* points)
(thi.ng.geom.types.Bezier2.)))
([points closed?]
(auto-spline2
(if closed?
(conj (vec points) (first points))
points))))
(auto-spline2
(if closed?
(conj (vec points) (first points))
points))))

(defn bezier3
[points] (thi.ng.geom.types.Bezier3. (mapv vec3 points)))
(defn auto-spline3
([points]
(->> points
(find-cpoints* vec3 0.25)
(auto-spline* points)
(thi.ng.geom.types.Bezier3.)))
([points closed?]
(auto-spline3
(if closed?
(conj (vec points) (first points))
points))))
[points] (thi.ng.geom.types.Bezier3. (mapv vec3 points)))

(defn auto-spline3
([points]
(->> points
(find-cpoints* vec3 0.25)
(auto-spline* points)
(thi.ng.geom.types.Bezier3.)))
([points closed?]
(auto-spline3
(if closed?
(conj (vec points) (first points))
points))))
#+END_SRC

** TODO Bezier2
Expand Down

0 comments on commit e00c63d

Please sign in to comment.