Quote:
Originally Posted by zenbo
ok mate, ill try it later, all grids have a horizont line where first and second vanishingpoints are put onto, the third point is above them.if you have time it would be nice if you could explain me the proper usage of the program
|
When you open your terminal to run the script, the revised script will print a length usage message if you run the script with no arguments (e.g. "./grid"). You'll need to scroll up in the terminal window to read it all.
Here's the high-level view of how the script works--what it's actually doing. Gnuplot is what draws the image. The script simply creates the data files that tell gnuplot what to draw.
Because gnuplot is more-or-less a tool designed to plot functions, the data files contain information in the form of coordinates and offsets. So, that is why the script requires vanishing points be given with coordinates. The script tries to simplify using coordinates by treating gnuplot's center-point/origin at the bottom left of the produced image. That way, the user will always be entering positive coordinates--no worrying about negatives (except for specific reasons). If you use the defaults, you can visualize this by drawing a graph-paper-grid on a sheet of paper (in landscape--i.e. longest dimension horizontal) with the grid lines 1 inch apart. That's the coordinate system.
When you specify a point to the script, you're giving the coordinate for a vanishing point. By default, a vanishing point is illustrated by drawing radial lines extending from the point you specify. If you take all the defaults, a radial will be drawn at 0 degrees (a horizontal line extending to the right) and additional radial lines will be drawn every 5 degrees counter-clockwise for a full rotation (i.e. all the way back to 0 degrees).
In a nutshell, that's it. That's all the script does. It calculates the coordinates needed for gnuplot to draw the radials. It gives you options to control how many radials are drawn, but it's all just a variation on the process above.
For two vanishing points to share a horizontal line: specify two points to the script with both points having the same y-coordinate (e.g. (1,
5) and (10,
5) --or-- (2,
7) and (7,
7))
Example command:
Code:
./grid -point 1 5 -point 10 5
That will draw two vanishing points with each having a radial drawn at 5 degree increments for the full 360 degrees. Both are on a horizontal line because their y-coordinates are the same value (5).
Example command:
Code:
./grid -point 1 5 -anglestart 180 -point 10 5
That will draw two vanishing points like the previous command. The difference is, the first vanishing point will NOT have any radials drawn above its horizon. This is caused by the "-anglestart" option. In this case, the starting angle for drawing radials for the first vanishing point is 180 degrees (which is a horizontal line extending to the left of the paper) and each additional radial will be drawn 5 degrees apart.
You can add as many points as you like:
Code:
./grid -point 1 3 -anglestart 180 -point 10 3 -anglestart 180 -point 5.5 7
Whether that produces the type of grid you want is up to you. You can play with the options. It's probably quicker for you to run an experiment with the script than waiting for me to see a question and respond.
Some "tricks":
To draw a horizontal line, include this as part of the script's options:
Code:
./grid -point 1 4 -radials 1
You interpret that as "draw one radial between 0 degrees and 360 degrees. The result is a radial drawn at 180. So, it draws a horizontal line 4 "inches" up from the bottom of the image.
To have a vanishing point have more radials at certain degrees. Try this:
Code:
./grid -point 4 4 -anglestop 45 -radials 50 -point 4 4 -anglestart 45 -anglestop 135 -radials 50 -point 4 4 -anglestart 135 -anglestop 180 -radials 50