Page 137 - Learn to Program - Basic-256
P. 137

Chapter 9: Custom Graphics – Creating Your Own Shapes.                          Page 121


                14      circle 200,200,100
            Program 55: Transparent Circles





























            Sample Output 55: Transparent Circles




                1       # stamptriangle4.kbs - stamp randomly colored, sized
                        and rotated triangles
                2
                3       clg
                4       penwidth 3
                5
                6       for t = 1 to 100
                7          x = rand * graphwidth
                8          y = rand * graphheight
                9          s = rand * 7          # scale up to 7 times larger
                10         r = rand * 2 * pi     # rotate up to 2pi (360
                        degrees)
                11         rpen = rand * 256     # get the RGBparts of a
                        random pen color
                12         gpen = rand * 256
                13         bpen = rand * 256



                                                           © 2019 James M. Reneau (CC BY-NC-SA 3.0 US)
   132   133   134   135   136   137   138   139   140   141   142