In comp.lang.javascript message <
[email protected]
do you know how is it possiple to paint a logarithmic SPIRAL with javascrpr?
This will draw a spiral, at least in IE7 & FF3. You'll need to make it
logarithmic. There are probably better ways of drawing.
<div ID="XXX"
style="position:relative; margin:auto; width:440px; height:440px;
border:7px solid white; background:silver; ">
</div>
<script type-"text/javascript">
XX = document.getElementById("XXX")
for (var J=0 ; J<3000 ; J++) {
var Dg = document.createElement("div")
var DS = Dg.style
DS.position = "absolute"
DS.height = DS.width = "3px"
DS.background = "blue"
var X = J/15 * Math.sin(J/50)
var Y = J/15 * Math.cos(J/50)
DS.left = 220 + X + "px"
DS.top = 220 + Y + "px"
XX.appendChild(Dg) }
</script>
Optimise the spacing so that successive points do not greatly overlap.
Do not use many more points.