Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

2D pixels into 3D point cloud?

Name: Anonymous 2011-11-27 5:27

How do I convert 2d isometric sprite into a 3d model?

Name: Anonymous 2011-11-27 12:52

Here is an example of two complicated Scheme function, for translating between isometry and view coords. There is no need to know how they were derived to use them. They just work!

(define (map-to-view xy)
  (let ([x (vector-ref xy 0)]
        [y (vector-ref xy 1)])
    (vector (- (* x (/ tile-w 2)) (* y (/ tile-w 2)))
            (- (* x (/ tile-h 2)) (* y (/ tile-h 2))))))

(define (view-to-map xy)
  (let ([x (vector-ref xy 0)]
        [y (vector-ref xy 1)])
    (vector (/ (+ (* y tile-w) (* x tile-h))
               (* tile-w tile-h))
            (/ (- (* y tile-w) (* x tile-h))
               (* tile-w tile-h)))))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List