Mapper (simplifies map making)
Mapper (simplifies map making)
I wrote a script in Perl that takes standard input and converts it into parts of a map to copy and paste (it mainly saves your hands typing). Download it from http://arma.ivantis.net/mapper.zip.
Note: You may have to change the first line of code to your Perl interpreter's path. Mine is /usr/bin/perl.
Note: You may have to change the first line of code to your Perl interpreter's path. Mine is /usr/bin/perl.
kyle: how do i do that? im not too good at maps, i just needed something to do
epsy: it takes standard input, you should run it through your command line on Mac OS X and UNIX/Linux systems, if you run windows, you will need a port of Perl, find one at cpan.org
epsy: it takes standard input, you should run it through your command line on Mac OS X and UNIX/Linux systems, if you run windows, you will need a port of Perl, find one at cpan.org
- kyle
- Reverse Outside Corner Grinder
- Posts: 1876
- Joined: Thu Jun 08, 2006 3:33 pm
- Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
- Contact:
i don't know perl but,
for a circle you would ask for center, radius and number of points.
then you would take and make a loop start at point 0 and go all the way up to that number of points (you have to have 1 extra to close it)
in that look you add the x point and y point
x would be center_x + radius_x * cos(point*2*PI/points)
y would be center_y + radius_y * sin(point*2*PI/points)
EDIT:^^yes better formula z-man i was sleepy
for a circle you would ask for center, radius and number of points.
then you would take and make a loop start at point 0 and go all the way up to that number of points (you have to have 1 extra to close it)
in that look you add the x point and y point
x would be center_x + radius_x * cos(point*2*PI/points)
y would be center_y + radius_y * sin(point*2*PI/points)
EDIT:^^yes better formula z-man i was sleepy
Last edited by kyle on Mon May 19, 2008 1:04 pm, edited 1 time in total.
http://mathworld.wolfram.com/Trigonometry.html
Specifically:
Specifically:
Let θ be an angle measured counterclockwise from the x-axis along an arc of the circle. Then cos(θ) is the horizontal coordinate of the arc endpoint, and sin(θ) is the vertical component.