SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2.  
  3. <html>
  4.     <head>
  5.         <meta charset="utf-8">
  6.         <title>Упражнение 9, zad 3</title>
  7.         <script src="suica.min.js"></script>
  8.         <script>
  9.             function main(n,r,x,y,z)
  10.             {
  11.                 new Suica();
  12.  
  13.                 oxyz();
  14.                 demo();
  15.                
  16.                for(var i=0;i<n;i++)
  17.                {
  18.                 var a=radians(random(0,360));
  19.                 var b=radians(random(0,360));
  20.  
  21.                 var px=x+r*Math.cos(a)*Math.cos(b);
  22.                 var py=y+r*Math.sin(a)*Math.cos(b);
  23.                 var pz=z+r*Math.sin(b);
  24.  
  25.                 p=point([px,py,pz]);
  26.                 p.pointSize=8;
  27.                 p.color=[random(0,1),random(0,1),random(0,1)];
  28.                }
  29.  
  30.             }
  31.         </script>
  32.         <style>
  33.             canvas{border: dotted black 5px;}
  34.         </style>
  35.     </head>
  36.     <body onload="main(300,15,2,7,-3)">
  37.         <canvas width="1000" height="700" style="border: solid black 1px;">Не се поддържа canvas!</canvas>
  38.         <noscript>JS not supported!</noscript>
  39.     </body>
  40. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top