Quote:
see you later |
Quote:
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 Example command: Code:
./grid -point 1 5 -anglestart 180 -point 10 5 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 Some "tricks": To draw a horizontal line, include this as part of the script's options: Code:
./grid -point 1 4 -radials 1 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 |
And, rather than add an edit to the previous post, here's a sample command that creates something sort of like the bottom half of the image from the original web page you linked to.
Code:
./grid -point 5.5 3.5 -radials 40 -anglestart 180 -point 0 3.25 -radials 1 -point 0 3 -radials 1 -point 0 2.5 -radials 1 -point 0 1.5 -radials 1 Something similar to the top half of the original image could be created by swapping things around. For instance: Code:
./grid -point 5.5 5.5 -radials 40 -anglestop 180 -point 0 5.75 -radials 1 -point 0 6 -radials 1 -point 0 6.5 -radials 1 -point 0 7.5 -radials 1 Code:
./grid -point 5.5 3.5 -radials 40 -anglestart 180 -point 0 3.25 -radials 1 -point 0 3 -radials 1 -point 0 2.5 -radials 1 -point 0 1.5 -radials 1 -point 5.5 5.5 -radials 40 -anglestop 180 -point 0 5.75 -radials 1 -point 0 6 -radials 1 -point 0 6.5 -radials 1 -point 0 7.5 -radials 1 |
dark helmet
i installed the script, it works fine, im trying all the options you includet, ill get back to you if i have more questions. most of all i wanna say thank you for your effort, this was really cool of you, im having a buddy helping me, who is better on computers than me. again thanks alot, ill let you know what i think of it. catch you later. zenbo |
No problem. I hope it works for you.
Every so often I get a "programming itch." It just so happened that I had one right around the time you posted your original message and it dawned on me that the process could be automated (somewhat) with gnuplot. So, as crazy as it might sound, I was entertained by the challenge of it. In addition to having entertained me, I hope it's ends up being useful for you :) |
Quote:
|
In all honesty, that script is not much of a programming feat, but I appreciate the compliment :)
As to your other questions, I've programmed here and there for a long time. Some in grade school, some in my university degree program, some professionally, and some just as a personal hobby. Though, I would not classify myself as a "professional" programmer. The work I did professionally was not the "software development" that most people think of. And yes, programming languages are computer-independent. A computer language just specifies the "vocabulary and grammar" to use when programming. Any computer can then interpret that code as long as the computer has a compiler--a translator of sorts (keeping with the analogy). If you ever decide to get into programming, you'll notice that there may be some cosmetic differences, but almost all programming languages support some core "features." Once you're proficient with one language, you probably won't need much time to become "competent" in another language. |
All times are GMT -5. The time now is 06:07 AM. |