Difference between revisions of "Musicboxes"

From CCRMA Wiki
Jump to: navigation, search
m
m
Line 6: Line 6:
  
 
calculate n-times rotation / min. of various diameters
 
calculate n-times rotation / min. of various diameters
 +
 +
public class SpinningBox : MonoBehaviour {
 +
 
 +
    public float yawDegreesPerSecond = 10.0f;
 +
 
 +
    // Update is called once per frame
 +
    void Update () {
 +
        Vector3 localEulers = transform.localEulerAngles;
 +
        localEulers.y += yawDegreesPerSecond * Time.deltaTime;
 +
        transform.localEulerAngles = localEulers;
 +
    }

Revision as of 20:08, 25 August 2014

http://whitneymusicbox.org/

rotating cylinders a la astrolabes

spherical astrolabe

calculate n-times rotation / min. of various diameters

public class SpinningBox : MonoBehaviour {
 
    public float yawDegreesPerSecond = 10.0f;
 
    // Update is called once per frame
    void Update () {
        Vector3 localEulers = transform.localEulerAngles;
        localEulers.y += yawDegreesPerSecond * Time.deltaTime;
        transform.localEulerAngles = localEulers;
    }