Created
November 19, 2015 15:21
-
-
Save JokerMartini/f8280a48978d31e1344f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--Bobo: The other way would be to use MatrixFromNormal, set the .row4 to the position of the object and assign to the .transform property. | |
( | |
s = sphere pos:[10,20,30] | |
t = teapot radius:5 | |
theMesh = snapshotasmesh s | |
for f = 1 to theMesh.numfaces do | |
( | |
theClone = instance t | |
theClone.transform = matrixFromNormal (getFaceNormal theMesh f) | |
theClone.pos = meshop.getFaceCenter theMesh f | |
--ALTERNATIVE: | |
-- theTM = matrixFromNormal (getFaceNormal theMesh f) | |
-- theTM.row4 = meshop.getFaceCenter theMesh f | |
-- theClone.transform = theTM | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment