geometrical diagrams

geometrical diagrams

Post by Elaine Jackso » Sun, 13 Jul 2003 05:15:07



Hola. I don't know much of anything about GIMP, but what I'd like to know right
off the bat is, Can you use it to make simple diagrams? For example, suppose I
wanted to draw a circle, pick15 evenly spaces points on the circle, and then
draw a line segment from each of those 15 points to all of the other 14 points.
Could I do that with GIMP? TIA for all helps and hints.

Peace,
EJ

 
 
 

geometrical diagrams

Post by robert » Sun, 13 Jul 2003 09:23:12


It could be done using the gfig plugin (right click - > filters -> render
-> gfig).  Of course, it will still be a lot of work.

> Hola. I don't know much of anything about GIMP, but what I'd like to
> know right off the bat is, Can you use it to make simple diagrams? For
> example, suppose I wanted to draw a circle, pick15 evenly spaces points
> on the circle, and then draw a line segment from each of those 15 points
> to all of the other 14 points. Could I do that with GIMP? TIA for all
> helps and hints.

> Peace,
> EJ


 
 
 

geometrical diagrams

Post by Phil Harp » Sun, 13 Jul 2003 10:57:55



> Hola. I don't know much of anything about GIMP, but what I'd like to know right
> off the bat is, Can you use it to make simple diagrams? For example, suppose I
> wanted to draw a circle, pick15 evenly spaces points on the circle, and then
> draw a line segment from each of those 15 points to all of the other 14 points.
> Could I do that with GIMP? TIA for all helps and hints.

> Peace,
> EJ

well, you probably could, but Dia http://www.lysator.liu.se/~alla/dia/
or sodipodi http://sodipodi.sf.net may be more suitable for the task

if you plan on doing it with GIMP look into the Gfig filter

 
 
 

geometrical diagrams

Post by Tsu Dho Nim » Sun, 13 Jul 2003 19:52:50



>Hola. I don't know much of anything about GIMP, but what I'd like to know right
>off the bat is, Can you use it to make simple diagrams? For example, suppose I
>wanted to draw a circle, pick15 evenly spaces points on the circle, and then
>draw a line segment from each of those 15 points to all of the other 14 points.
>Could I do that with GIMP? TIA for all helps and hints.

Not easily, because GIMP is not a vector drawing porgram.  You
could write a script that would do this, but after a circle is
drawn, GIMP can't select it as a distinct object.  

You would be better off using a CAD program - what OS are you
running.  

Tsu

--
To doubt everything or to believe everything
are two equally convenient solutions; both
dispense with the necessity of reflection.
- Jules Henri Poincar

 
 
 

geometrical diagrams

Post by Leonard Even » Mon, 14 Jul 2003 04:14:01



> Hola. I don't know much of anything about GIMP, but what I'd like to know right
> off the bat is, Can you use it to make simple diagrams? For example, suppose I
> wanted to draw a circle, pick15 evenly spaces points on the circle, and then
> draw a line segment from each of those 15 points to all of the other 14 points.
> Could I do that with GIMP? TIA for all helps and hints.

> Peace,
> EJ

I agree with the comment that you would be better off using a different
program designed to do vector graphics.  The gimp is designed for
continuous (photographic) images.  Under Linux, I use xfig for what you
want.  I am sure there are comparable programs running under Windows or
on the Mac.
 
 
 

geometrical diagrams

Post by Wilhelm Stockhamme » Mon, 14 Jul 2003 04:11:45



> Hola. I don't know much of anything about GIMP, but what I'd like to know right
> off the bat is, Can you use it to make simple diagrams? For example, suppose I
> wanted to draw a circle, pick15 evenly spaces points on the circle, and then
> draw a line segment from each of those 15 points to all of the other 14 points.
> Could I do that with GIMP? TIA for all helps and hints.

> Peace,
> EJ

Hola Elaine,
copy and paste the following program into a text-editor and save the
file as 'thread_starz.scm' into your '.gimp/scripts' directory.
Then select from the menu 'Xtns/Script-Fu/' the item 'Refresh'. After
that you will find Star(this program) in 'Xtns/Script-Fu/Misc'.
You can choose the radius of the circle and the number of points. Your
current selected brush should not be too thick if the points are many.

------------------------------------------------------------------------------
(define thread_starz
   (lambda (radius segments)
      (define pi 3.14159265359)
      (define inset 8)
      (define brush_width (car (cdr (gimp-brushes-get-brush))))
      (define size (+ (* (+ radius inset) 2) brush_width))
      (define image (car (gimp-image-new size size RGB)))
      (define layer_0 (car (gimp-layer-new image size size RGB-IMAGE
"Background" 100 NORMAL-MODE)))
      (gimp-image-undo-disable image)
      (gimp-drawable-fill layer_0 BG-IMAGE-FILL)
      (gimp-image-add-layer image layer_0 0)
      (define layer_1 (car (gimp-layer-new image size size RGBA-IMAGE
"Star Layer" 100 NORMAL-MODE)))
      (gimp-drawable-fill layer_1 TRANS-IMAGE-FILL)
      (gimp-image-add-layer image layer_1 0)
      (define single_segment (/ (* pi 2) segments))
      (while (> segments 0)
         (define seg_2 0)
         (while (< seg_2 segments)
            (define *points* (cons-array 4 'double))
            (aset *points* 0 (+ (/ size 2) (* (cos (* single_segment
seg_2)) radius)))
            (aset *points* 1 (- (/ size 2) (* (sin (* single_segment
seg_2)) radius)))
            (aset *points* 2 (+ (/ size 2) (* (cos (* single_segment
segments)) radius)))
            (aset *points* 3 (- (/ size 2) (* (sin (* single_segment
segments)) radius)))
            (gimp-paintbrush-default layer_1 4 *points*)
            (set! seg_2 (+ seg_2 1))
         )
         (set! segments (- segments 1))
      )
      (gimp-display-new image)
      (gimp-image-undo-enable image)
   )
)
(script-fu-register "thread_starz"
   "<Toolbox>/Xtns/Script-Fu/Misc/Star"
   "Creates a sort of star connecting each edge to each other"
   "Wilhelm Stockhammer"
   "Wilhelm Stockhammer"
   "2003"
   "RGB*"
   SF-VALUE "radius" "128"
   SF-VALUE "segments" "8"
)
-----------------------------------------------------------------------------------

 
 
 

geometrical diagrams

Post by d re » Mon, 14 Jul 2003 09:35:14


Quote:> > draw a circle, pick15 evenly spaces points on the circle, and then

draw a line segment from each of those 15 points to all of the other
14 points.

-in a transparent layer, draw a line segment from the centerpoint of
your canvas the length of the radius of your circle. (either with the
pen tool/stroke path or with a very thin rectangular selection)

-copy, paste, rotate 24 degrees. repeat 15 times.

-throw a circle out from the centerpoint (alt+click, ctrl+click? i
forget) using the circle select tool until it touches the endpoints of
your lines.

-stroke the circle (edit > stroke) with a fine line (stroke line width
= currently selected brush width in brush dialog)

you should now have a template where the line and circle points
intersect.

-create a new transparent layer and go to town connecting the dots
with the pen tool.

-stroke the paths (solid circle button in the paths dialog) and that
should do it.

that's one way to do it. i hope it helps. i've never used gfig before.
i'm going to explore it right now.

 
 
 

geometrical diagrams

Post by robert » Mon, 14 Jul 2003 12:59:34


Nice job on the script.  Solves the problem better than the other
solutions presented, including mine.  Out of curiousity, how long did it
take you to write?

<snip>

Quote:

> Hola Elaine,
> copy and paste the following program into a text-editor and save the
> file as 'thread_starz.scm' into your '.gimp/scripts' directory. Then
> select from the menu 'Xtns/Script-Fu/' the item 'Refresh'. After that
> you will find Star(this program) in 'Xtns/Script-Fu/Misc'. You can
> choose the radius of the circle and the number of points. Your current
> selected brush should not be too thick if the points are many.

> ------------------------------------------------------------------------------
> (define thread_starz
>    (lambda (radius segments)
>       (define pi 3.14159265359)
>       (define inset 8)
>       (define brush_width (car (cdr (gimp-brushes-get-brush)))) (define
>       size (+ (* (+ radius inset) 2) brush_width)) (define image (car
>       (gimp-image-new size size RGB))) (define layer_0 (car
>       (gimp-layer-new image size size RGB-IMAGE
> "Background" 100 NORMAL-MODE)))
>       (gimp-image-undo-disable image)
>       (gimp-drawable-fill layer_0 BG-IMAGE-FILL) (gimp-image-add-layer
>       image layer_0 0) (define layer_1 (car (gimp-layer-new image size
>       size RGBA-IMAGE
> "Star Layer" 100 NORMAL-MODE)))
>       (gimp-drawable-fill layer_1 TRANS-IMAGE-FILL)
>       (gimp-image-add-layer image layer_1 0) (define single_segment (/
>       (* pi 2) segments)) (while (> segments 0)
>          (define seg_2 0)
>          (while (< seg_2 segments)
>             (define *points* (cons-array 4 'double)) (aset *points* 0 (+
>             (/ size 2) (* (cos (* single_segment
> seg_2)) radius)))
>             (aset *points* 1 (- (/ size 2) (* (sin (* single_segment
> seg_2)) radius)))
>             (aset *points* 2 (+ (/ size 2) (* (cos (* single_segment
> segments)) radius)))
>             (aset *points* 3 (- (/ size 2) (* (sin (* single_segment
> segments)) radius)))
>             (gimp-paintbrush-default layer_1 4 *points*) (set! seg_2 (+
>             seg_2 1))
>          )
>          (set! segments (- segments 1))
>       )
>       (gimp-display-new image)
>       (gimp-image-undo-enable image)
>    )
> )
> (script-fu-register "thread_starz"
>    "<Toolbox>/Xtns/Script-Fu/Misc/Star"
>    "Creates a sort of star connecting each edge to each other" "Wilhelm
>    Stockhammer"
>    "Wilhelm Stockhammer"
>    "2003"
>    "RGB*"
>    SF-VALUE "radius" "128"
>    SF-VALUE "segments" "8"
> )

 
 
 

geometrical diagrams

Post by Michael Soibelma » Tue, 15 Jul 2003 08:59:17




>> Hola. I don't know much of anything about GIMP, but what I'd like to know right
>> off the bat is, Can you use it to make simple diagrams? For example, suppose I
>> wanted to draw a circle, pick15 evenly spaces points on the circle, and then
>> draw a line segment from each of those 15 points to all of the other 14 points.
>> Could I do that with GIMP? TIA for all helps and hints.

>> Peace,
>> EJ

> Hola Elaine,
> copy and paste the following program into a text-editor and save the
> file as 'thread_starz.scm' into your '.gimp/scripts' directory.
> Then select from the menu 'Xtns/Script-Fu/' the item 'Refresh'. After
> that you will find Star(this program) in 'Xtns/Script-Fu/Misc'.
> You can choose the radius of the circle and the number of points. Your
> current selected brush should not be too thick if the points are many.

> ------------------------------------------------------------------------------
> (define thread_starz
>    (lambda (radius segments)
>       (define pi 3.14159265359)
>       (define inset 8)
>       (define brush_width (car (cdr (gimp-brushes-get-brush))))
>       (define size (+ (* (+ radius inset) 2) brush_width))
>       (define image (car (gimp-image-new size size RGB)))
>       (define layer_0 (car (gimp-layer-new image size size RGB-IMAGE
> "Background" 100 NORMAL-MODE)))
>       (gimp-image-undo-disable image)
>       (gimp-drawable-fill layer_0 BG-IMAGE-FILL)
>       (gimp-image-add-layer image layer_0 0)
>       (define layer_1 (car (gimp-layer-new image size size RGBA-IMAGE
> "Star Layer" 100 NORMAL-MODE)))
>       (gimp-drawable-fill layer_1 TRANS-IMAGE-FILL)
>       (gimp-image-add-layer image layer_1 0)
>       (define single_segment (/ (* pi 2) segments))
>       (while (> segments 0)
>          (define seg_2 0)
>          (while (< seg_2 segments)
>             (define *points* (cons-array 4 'double))
>             (aset *points* 0 (+ (/ size 2) (* (cos (* single_segment
> seg_2)) radius)))
>             (aset *points* 1 (- (/ size 2) (* (sin (* single_segment
> seg_2)) radius)))
>             (aset *points* 2 (+ (/ size 2) (* (cos (* single_segment
> segments)) radius)))
>             (aset *points* 3 (- (/ size 2) (* (sin (* single_segment
> segments)) radius)))
>             (gimp-paintbrush-default layer_1 4 *points*)
>             (set! seg_2 (+ seg_2 1))
>          )
>          (set! segments (- segments 1))
>       )
>       (gimp-display-new image)
>       (gimp-image-undo-enable image)
>    )
> )
> (script-fu-register "thread_starz"
>    "<Toolbox>/Xtns/Script-Fu/Misc/Star"
>    "Creates a sort of star connecting each edge to each other"
>    "Wilhelm Stockhammer"
>    "Wilhelm Stockhammer"
>    "2003"
>    "RGB*"
>    SF-VALUE "radius" "128"
>    SF-VALUE "segments" "8"
> )
> -----------------------------------------------------------------------------------

Nice job!  
 
 
 

1. Geometrical optics with POVRAY (2 or 3)

Hi!

A colleague wants to check the design of a telescope in construction,
in particular the effect of slight tilts in the mirrors.  The optical
surfaces are only, for the moment, mirrors.  These surfaces can
be nicely defined in Povray by quadrics (paraboloid, etc.).  

My question is whether anybody has already tried to use Povray for
`real' optical applications (I understand that only geometrical optics
can be tested).  In particular I wonder whether special parameters
have to be set, because optical devices such as telescope are designed
to exchange rays with objects widely apart (e.g. with stars!).  
Also which set of parameters does represent well mirrors and which
parameters introducing unphysical effects should be particularly
avoided?

I have seen nothing on this subject in the manual and in the FAQ, but
sometimes *ray* tracing might have something to do with optical
devices in the real world!

Thanks in advance,

Daniel

====================================================
 Dr Daniel Pfenniger |

 CH-1290 Sauverny    | tel: +41 (22) 755.26.11
 Switzerland         | fax: +41 (22) 755.39.83
====================================================

2. Choose a Webbrouwser in PM 6.5 !?

3. Geometrical data decoupled from visualization

4. New user forum for 3Ds MAX users

5. func. for geometrical position

6. Batch conversion question

7. Help with the geometrical centre

8. DirectX Conv3DS.exe & DirectX8 Plugin, are they faulty?

9. HELP: problems with a geometrical jigsaw

10. Vetigo export file format for geometrical constructs

11. Plex language in Solid/Geometrical modeling

12. Geometrical mapping..

13. Basic geometrical shapes