码迷,mamicode.com
首页 > 其他好文 > 详细

ardunio 1 processing 显示三轴数据

时间:2017-09-25 00:53:31      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:tran   process   cpp   spotlight   set   image   box   mon   分享   

http://blog.csdn.net/Fortware/article/details/38307799

技术分享

 

 

/**
 * Mixture
 * by Simon Greenwold. 
 * 
 * Display a box with three different kinds of lights. 
 */

void setup() {
  size(640, 360, P3D);
  noStroke();
}

void draw() {
  background(0);
  translate(width / 2, height / 2);
  
  // Orange point light on the right
  pointLight(150, 100, 0, // Color
             200, -150, 0); // Position

  // Blue directional light from the left
  directionalLight(0, 102, 255, // Color
                   1, 0, 0); // The x-, y-, z-axis direction

  // Yellow spotlight from the front
  spotLight(255, 255, 109, // Color
            0, 40, 200, // Position
            0, -0.5, -0.5, // Direction
            PI / 2, 2); // Angle, concentration
  
  rotateY(map(mouseX, 0, width, 0, PI));
  rotateX(map(mouseY, 0, height, 0, PI));
  box(150);
}

  

 

ardunio 1 processing 显示三轴数据

标签:tran   process   cpp   spotlight   set   image   box   mon   分享   

原文地址:http://www.cnblogs.com/dongvdong/p/7589429.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!