package sample.svg3d;
import static util.SVGUtil.*;
import static java.lang.Math.asin;
import static java.lang.Math.cos;
import static java.lang.Math.sin;

public class RandTest2 {
    public static void main(String[] args) {
        start();                     /* 最初に必要 */
        trimMark();

        strokeWeight(.05);
        stroke(hsb360(0, 0, 0)); /* 線の色 */
        fill(hsb360(120, 50, 50));  /* 塗りの色 */
                
        setRegularPolyhedronNet(12);            
        drawBackgroundPolyhedron();
                
        strokeWeight(.5);
        int i;
        for (i = 0; i < 128; i++) {
                        
            double h = randomInRange(0, 360);
            double seed = randomInRange(0, 100);
            double b = asin((seed - 50) / 50); 
            stroke(hsl360(h, 100, b / PI * 100 + 50));
            fill(hsl360(h, 50, b / PI * 100 + 50));
                        
            circleSpherical(cos(b) * cos360(h), cos(b) * sin360(h), sin(b), 5);
        }
                
        finish();                    /* 最後に必要 */
    }
}
