Systematic Architecture [EN]
The blog on systems development/architecture, to be a beautiful, artistic one.
Friday, 25 December 2015
Grab an Object in 3D with Processing
Grab an Object in 3D with Processing ================================ I want to grab a 3D object. I came up just with it but that's not twopence work. I'm an amateur for 3D processing. The solutions I researched 1. pixels matching - Pixelate all objects and match them with the cursor as a computer scientific method. 1. ray casting - Cast the ray to the rear which objects may hit as a linear algebraic method. 1 does the trick rather than conceptual calculation so I try 2 first. The Processing however doesn't have a method from the screen coordination to the model coordination, although it's just a problem if I create or not. And I tried to reify 2 with the Camera angle from the the front to the rear but it doesn't work yet with unknown distortion of the coordination. Thus I had to post the article in time I used the existing method, screenX() etc. which can convert the model coordination to the screen coordination. ![demo](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG3uPHd3e5pOXwEZsg-CACtJ4bvu0QPMIuYtjUzzAQWErn16Q0riCkfW_wNd0x7Pp-dsPX1cW_oI0B9BBIsh0SCGrPlkiaQ12P40-Y7zKwKcAymGouBLLi3YAeyzAiQ-lbkOsTRYnx0H0/s320/grabbing-demo-trimmed.gif) I didn't have enough time to show it on P5.js. Here are [source codes](https://github.com/lamusique/ScalaProcessing/blob/feature/samples/src/test/scala/com/nekopiano/scala/processing/sandbox/sample/Grabbing.scala) I wrote with [Processing with Scala](http://sys-architecture.blogspot.com/2015/12/processing-with-scala.html) ToDos - Process with inverse matrix based on mathematics. - Sync the amount of the movement between the mouse and the model - Move only one object in the front
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment