Cleaned up extraneous rhumb lines and rotated them slightly, and added a neatline.
### LATEST WIP ###
aug-sept-outline.png
I'm trying a Portolan Chart: http://en.wikipedia.org/wiki/Portolan_chart
So far I've vectorized, cleaned up, and tweaked the base image in Inkscape, and written a little program to generate the web of Rhumb Lines.
### LATEST WIP ###
aug-sept-outline.png
Cleaned up extraneous rhumb lines and rotated them slightly, and added a neatline.
### LATEST WIP ###
aug-sept-outline.png
hello you... any chance you`d share that little rhumb program?? me wants it very bad!![]()
Code:#!/usr/bin/ruby1.9.1 require 'matrix' p=4 n=2**p d1=600 d2=4*d1 points=Array.new(n) do |k| theta=2*Math::PI*k/n x=d1*Math.cos(theta) y=d1*Math.sin(theta) Vector[x,y] end def line(p1,p2,style) "<path d=\"M#{p1.to_a.join " "} L#{p2.to_a.join " "}\" style=\"#{style}\" />" end puts <<EOS <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg"> EOS n.times do |k| p1=points[k] (k...n).each do |l|#<path d="M250 150 L150 350 L350 350 Z" /> style=(k+l)%2==0? "stroke:black;stroke-width:0.5px;":"stroke:red;stroke-width:0.5px;" opacity="opacity:#{rand*0.5+0.5}" p2=points[l] v=p1-p2 v=v*d2*(1.0/v.r) p3=p1+v p4=p2-v # p4 - p2 - p1 - p3 print line(p1, p2, style+opacity) print line(p4, p2, style+opacity) puts line(p1, p3, style+opacity) end style="stroke:black;stroke-width:0.5px;" theta=2*Math::PI*(k+n/4)/n x=d2*Math.cos(theta) y=d2*Math.sin(theta) v=Vector[x,y] p2=p1+v p3=p1-v opacity="opacity:#{rand*0.5+0.5}" print line(p1, p2, style+opacity) puts line(p1, p3, style+opacity) end puts "</svg>"
thank you very much.
now i just need to know how to make all this code work?? heh heh..... where do i use it?? (total n00b, yes)
![]()
![]()
Well, you need a Ruby runtime to run it: http://www.ruby-lang.org/en/
If it's easier, here's the SVG file output, zipped because the forum software refuses to allow SVG files. With the program you can change the number of directions, but most real portolans seem to have 16 directions.
I`m sorry, but i haven`t got a clue here!
Where do I use the SVG file?? I tried it in Firefox, but I only got some of the image (three stars in the upper left corner)...
Is there somewhere in the code I can change the amount of "stars"?
![]()
AHA! I`m such a dumbass! You just copy and rotate the things??
But is there anyway I can get the image bigger than in my browserwindow??
Last edited by sigurdbjohansson; 08-21-2010 at 07:36 PM.
Thanks alot! I think I`ve got the hang of it now....![]()