arcs1 - <?xml version="1.0"?> <!DOCTYPE...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
<?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ""> <svg xmlns="" xmlns:xlink="" id="canvas" width="2000" height="2000" onload="init()"> <style type="text/css"> .ellipse { stroke: red; stroke-width: 2; fill: blue; fill-opacity: 0.1; } .axes { stroke: blue; stroke-width: 1; } </style> <script> <![CDATA[ var COLS = 4; var ROWS = 4; var RX = 80; var RY = 30; function init() { var canvas = document.getElementById("canvas"); var angleStep = 360.0/(COLS*ROWS); var spacing = 2*Math.max(RX, RY)+10; for (var c = 0; c < COLS; ++c) { for (var r = 0; r < ROWS; ++r) { var ellipse = createEllipse((c+ COLS*r)*angleStep, spacing*(c+0.5), spacing*(r+0.5), RX, RY); canvas.appendChild(ellipse); } } } function createEllipse(phi, x, y, rx, ry) { var degPerRad = Math.PI/180.0; var e1x = rx*Math.cos(phi*degPerRad);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/01/2011 for the course COM 12 taught by Professor Jeing during the Spring '10 term at Appalachian State.

Page1 / 2

arcs1 - &lt;?xml version=&quot;1.0&quot;?&gt; &lt;!DOCTYPE...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online