programm for perspective-grid
hey guys
i am looking for a program to create perspective-grids to draw skyscrapers, houses etc. in perspective.heres a sample. http://www.perspectivegrid.com/index.php?page=9^0^0 thanks and greetings zenbo zenbo |
I don't know if I understand your request, but Blender is great for setting up 3d scenes which you can then render as a picture or film with a moving camera. It's free. I've been playing with it for years. You can make anything from buildings to people, etc.
|
I wasn't sure what a "perspective-grid" was either. Then I did a quick search. If i understand correctly, it's just a 2D projection of squares/rectangles as they diminish to a fixed vanishing point.
Anyway, my terminology notwithstanding, I did see a link to a You Tube video that purports to show how to create perspective grids in GIMP (which should be included in virtually every Linux distribution). Here's the link: GIMP: How to Create Perspective Grids with the Path Tool |
Quote:
heres what i mean, those grids are for artists to draw houses etc. over them: http://www.perspectivegrid.com/index.php?page=9^0^0 |
Well, I was bored and struck by inspiration. So I wrote a script to generate some basic perspective grids using gnuplot.
This probably won't do everything you want it to do. However, it shows that with some scripting, you can modify it and get the features you want. To use it, you will need to have gnuplot and bc installed. Almost every distribution has bc. So the only thing you might need to install would be gnuplot. The way it works is, you specify vanishing point coordinates on the command line. You can specify as many as you like, but I've never seen more than two. You also specify an angle increment for each vanishing point. For each vanishing point, a horizontal line is drawn. Then an angled line is drawn through each vanishing point at each angle increment specified. For instance, you could run the script like so: Code:
<script_name> -point 10 7 -angle 5 -point 1 7 -angle 10 The coordinates are in "inches" and the origin would be the bottom-left of the image produced. The script defaults to creating an image for a plain 8.5 x 11 sheet of paper in landscape. The visible coordinates are restricted to the paper size. For instance, using the defaults, x-values from 0 to 11 would be visible and y-values from 0 to 8.5 would be visible. There is no restriction on the placement of the vanishing points--they need not be placed within the viewable area. Some caveats: (1) Because gnuplot is used as the drawing workhorse, it is not a simple matter to have it draw a vertical line. It's not impossible to do (there are directives to manually draw non-function related lines), but I didn't look into it much. Besides, manually drawing one vertical line per vanishing point ain't a lot of inconvenience. (2) Currently, the angle increment(s) must be integers and they should divide into 180 degrees evenly. If they do not divide into 180 evenly, the radial lines will be "unbalanced." (3) While this script cannot create the image shown on the website you linked to, it is feasible to use the script two or more times and piece the resulting images together. For instance, to create the "floor" of the image on that webpage, you could run the script once with a few vanishing points (e.g. "<script_name> -point 5.5 8.5 -angle 5 -point 5.5 8 -angle 180 -point 5.5 7 -angle 180 -point 5.5 5 -angle 180"). By placing the first point at the upper limit of the viewing area, you "cut off" the top half of the radial lines. The subsequent points are horizontal lines because their angle increment is 180. You repeat the process for the "roof" by creating another plot, but this time putting the first vanishing point at the bottom of the viewing area and placing the horizontal lines above. You might also use image manipulation software to do some scaling. Though, it is possible to do that directly through gnuplot. I did not add that into the script, but it could be done. In all, it's passable and decent (in my opinion) for a few hours of hacking. If you want to try it out, make sure you read the script's comments regarding options it recognizes (e.g. -point, -angle, -dpi, -paperwidth, -paperheight, -output). There is NO nice "usage" help message. Copy the script into a text editor, save it, make it executable (chmod u+x <script_name>), and then give it a try if you like. Here's the script Code:
#!/bin/bash |
wow!!!!!
thanks alot, i hope i get this thing running!! thanks mate, i appreciate it!!!!!!! greetings zenbo |
im quite a newb, i will download that program, and see if i can run your script, maybe ill need some help, and you happen to have time to check this thread, ill keep ya informed.
thanks and greetings zenbo |
Well, I'm actually working on improving it a bit.
I'm trying to add angle start/stop for the radial lines, give the alternative option of saying "I want X radial lines spaced equally between the start-stop angles," and allow for floating-point angle values. And I'm looking at changing the drawing mechanism from functions to two-point line segments--which would allow for vertical lines easily enough. Though, I need to look at the gnuplot docs just to make sure what I'm thinking is possible. I'll post a revised script with what I get working. I may not get everything I want added, but I'll get some. |
ok, first prob, i downloaded gnuplot, but cant find it, its not where the other progs are...
also i pasted the script into the terminal, and pressed enter, after that the terminal desapeared.. |
You'll be using this from the command line. You won't ever actually manually open gnuplot--the script takes care of that.
So, open a terminal: if you're using Ubuntu or something Debian-based, there should be an Applications->Accessories->Terminal menu item (or something similar). That will get you to a command prompt. Save the script somewhere. And then, in the terminal, issue "cd <path>" where <path> is the directory to where you saved the script. Once in the same directory (you can confirm by typing "ls -l" at the terminal, and you should see the filename of the script you saved), then issue the command "chmod u+x <filename>" where <filename> is whatever you named your local copy of the script. To run it, the type "./<filename> <options>" where <options> are whatever switches you want to give the script. It should print some info, and if all is successful, there will be a new PNG file in the same directory. You can use whatever image-viewing utility you like to look at it. Just navigate to it with whatever file manager you use and double-click. EDIT: Quote:
The reason the terminal disappeared was because pasting it directly caused the terminal to try and execute the script then and there. There are some "exit" statements that would have caused the terminal to close. It's not a big deal. Like I said, just save it as a file, and you'll launch it from the terminal a little later. EDIT2: And to make sure that gnuplot is installed, type "which gnuplot" at the terminal. If it doesn't spit out anything but another prompt, then gnuplot has not been installed. You should see something like this: Code:
user@localhost:~$ which gnuplot |
Quote:
you dont mean typing it in, right? did you mean alt+F2 , (run application) ? |
You don't necessarily need to use that specific method. In an earlier reply, you mentioned that you had pasted the script directly into the terminal and the terminal disappeared.
However you opened that previous terminal is fine--just so long as you can get to a command line. |
Quote:
|
Quote:
Other options: 1. Navigate through your programs menu (or whatever Mint refers to it as) and look for any subgroup that has an entry for "terminal" or "command line." And start it from there. 2. You can use the alt+f2 shortcut if you like and run "gnome-terminal" or "xterm" or "konsole" or whatever terminal emulator you have installed. |
Quote:
|
All times are GMT -5. The time now is 12:55 PM. |