Bureaucrats, emailconfirmed, Administrators
5,746
edits
| Line 41: | Line 41: | ||
Firstly I created window and renderer to display the visualization by using jit.world and changed screen’s background colour. Seconly I created shape for rendering, in which I can control the shape and colour of it. Thirdly I created mesh of the shape to control draw mode and scale. Fourthly I created the rotation of the shape and connected to jit.gl.mesh to make the visualization move dynamically. | Firstly I created window and renderer to display the visualization by using jit.world and changed screen’s background colour. Seconly I created shape for rendering, in which I can control the shape and colour of it. Thirdly I created mesh of the shape to control draw mode and scale. Fourthly I created the rotation of the shape and connected to jit.gl.mesh to make the visualization move dynamically. | ||
<gallery> | |||
File:Screen Shot 2562-07-29 at 01.40.31.png|Visualization part | |||
File:Screen Shot 2562-07-29 at 01.41.25.png|Rotation of the shape | |||
</gallery> | |||
'''Connecting Arduino to Max/msp:''' | '''Connecting Arduino to Max/msp:''' | ||
After connecting the sensor to Arduino, I got the values between 20 to 883. Then I scaled down the range of number to 0 to 150 in Max/msp. After that I created the condition for the number to control the visualization, by using togedge to send the message to jit.gl.gridshape to change the form and jit.gl.mesh to change draw mode and scale. Lastly the rotation of the shape could also control by the values, by creating 3 float numbers and connected to jit.euler2quat, which would translate the number to x, y and z axis, and sent them to jit.gl.mesh. | After connecting the sensor to Arduino, I got the values between 20 to 883. Then I scaled down the range of number to 0 to 150 in Max/msp. After that I created the condition for the number to control the visualization, by using togedge to send the message to jit.gl.gridshape to change the form and jit.gl.mesh to change draw mode and scale. Lastly the rotation of the shape could also control by the values, by creating 3 float numbers and connected to jit.euler2quat, which would translate the number to x, y and z axis, and sent them to jit.gl.mesh. | ||
<gallery> | |||
File:Screen Shot 2562-07-30 at 16.21.10.png | |||
File:Screen Shot 2562-07-30 at 15.21.37.png | |||
</gallery> | |||
==Experimenting with Max Patches== | ==Experimenting with Max Patches== | ||