GimpTalk Announcement :
Try your digital-art skills against your fellow gimpers in GIMPtalk's Biweekly Art competition !


Board index » GIMP Art Galleries and Resources » GIMP Plugins, Filters, and Scripts Web Development Services . Convert FLV to Cell Phone Format
Featured Tutorial : Learn how to create characters by Griatch
Search for :  


Post new topic Reply to topic   [ 14 posts ]  


Author Message
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 10:12 am 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics

Here is a beta 0.6 release of my paths
http://www.mediafire.com/?jzmre45q1oi
Bugfixes for this version
Spiral error fixed in version

Tutorial number 1 ready!
http://lightningismyname.deviantart.com/art/LIMN-s-Path-Scripts-Tutorial-80785093
More Tips, Tricks and handy ways of using them will be posted soon!

-----

Why beta? They are probably a bit buggy (although it worked fine for me), should take some time to fix. Another reason is that the pack isn't complete yet, there should be 3 more scripts.

-----
Scripts Review:

actions 1 to 3 will depend on existing paths
actions 4 to 9 will create new paths


1. Split to strokes
Location - paths dialog, right click on a path
What does it do - Take an active path and create a new path from each of it's strokes (doesn't delete the source)

2. Selection - Stroke sum
Location - paths dialog, right click on a path
What does it do - make a selection from the sum of the selection of the strokes, not from the difference like the normal way
Image

3. Polygonize
Location - paths dialog, right click on a path
What does it do - remove all curves from a path to make a polygon using it's anchors
Image

4. Polygon
Location - Image window, Shape menu
What does it do - draw a polygon with the specified amount of sides (all lines will have equal length and all angles will be the same) and with a specified radius
has some filling/stroking options
Image

5. Polygon Star
Location - Image window, Shape menu
What does it do - draw a polygonal star with the specified amount of sides (all lines will have equal length and all angles will be the same), with a specified radius for the inner part and a specified radius for the outer part
has some filling/stroking options
Image

6. Golden Spiral
Location - Image window, Shape menu
What does it do - draw the golden spiral (A spiral with the golden ratio)

7. Spiral
Location - Image window, Shape menu
What does it do - draw a spiral

8. Ellipse
Location - Image window, Shape menu
What does it do - draw an elliptical path with the desired width/height

9. Duplicate and rotate path
Location - Image window, Shape menu
What does it do - duplicate the active path a specified number of times and rotates it to create a circle
Image



Top
 Profile  
 
Online
 Post subject:
PostPosted: Sun Mar 23, 2008 11:39 am 
GT Manager

User avatar

Joined:
Mon Jun 13, 2005 11:15 am

Topics:
Posts: 10074

Find User's Topics
seems cool i'm going to try them

_________________
Image

http://www.flickr.com/photos/97844002@N00/


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 4:45 pm 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics
Tutorial number 1 ready!
http://lightningismyname.deviantart.com/art/LIMN-s-Path-Scripts-Tutorial-80785093


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 7:49 pm 
GT Moderator

User avatar

Joined:
Thu Dec 29, 2005 5:29 pm

Topics:
Posts: 3892

Find User's Topics
does this work for 2.2?

_________________
secks frum samusluvver:
Image

absolute awesomeness from Greentunic :3 secks frum flamed


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 8:36 pm 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics
I don't think so curly - these were written and tested on 2.4...

I can try translating them back to GIMP 2.2 since my brother's computer has 2.2.
It should be ready in the next sevral days


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 9:23 pm 

Joined:
Thu Feb 23, 2006 5:38 am

Topics:
Posts: 1627

Find User's Topics
I received an error for the Spiral script:

Image

I'm using Gimp 2.4.5 on GNU/Linux

Otherwise, all of the other scripts are working fine so far and I'm really loving these!

:h:


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 23, 2008 9:32 pm 
GT Moderator

User avatar

Joined:
Thu Dec 29, 2005 5:29 pm

Topics:
Posts: 3892

Find User's Topics
if you could, i'd really appreciate it. :)

_________________
secks frum samusluvver:
Image

absolute awesomeness from Greentunic :3 secks frum flamed


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Mon Mar 24, 2008 6:06 am 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics
See the problem in the spiral - here is a bug fix. paste as the contents of the spiral.scm file or just download the new zip from here: http://www.mediafire.com/?jzmre45q1oi
erase the old files and put these in the link above instead

Code:
;Draw a spiral
;For the latest version, email me at <lightningismyname@gmail.com>



;(add-point-at-end) will add a point at the end of a stroke of a given path
;It will recieve a float-array of 3 points (X and Y - total 6) as Control Anchor Control
;a new stroke will be created and the old one will be delted
;the way to find out the ID of the new stroke is to get the latest stroke of the object

(define (add-point-at-end vectors stroke-id point)

     (let* (

   (point_count (cadr(gimp-vectors-stroke-get-points vectors stroke-id)))
   (points (caddr(gimp-vectors-stroke-get-points vectors stroke-id)))
   (new-points (cons-array (+ 6 point_count) 'double))
   (count 0) (count2 0)
     )
   

   (while (< count point_count)
   (begin

      (aset new-points count (aref points count))

      (set! count (+ 1 count))

   ))

   (while (< count2 6)
   (begin
      (aset new-points count (aref point count2))

      (set! count (+ 1 count))
      (set! count2 (+ 1 count2))

   ))

   (gimp-vectors-stroke-new-from-points vectors 0 (+ point_count 6) new-points (cadddr(gimp-vectors-stroke-get-points vectors stroke-id)))
   (gimp-vectors-remove-stroke vectors stroke-id)

))

(define (script-fu-spiral2 img segments width)

     (let* (

   (vectors (car(gimp-vectors-new img "Golden Spiral")))
   (x (/ (car(gimp-image-width img)) 2))
   (y (/ (car(gimp-image-height img)) 2))
   (stroke-id 0)
   (start (cons-array 12 'byte))

   (pointx 0)
   (pointy 0)

   (control1x 0) ;parts of the point
   (control1y 0)
   (anchorx 0)
   (anchory 0)
   (point (cons-array 6 'byte))

   (countme width)

   (count 0)
   (vector_length 8)   ;will be used for aref - always the loction of the last anchor X
   
     )

   

   ;undo group
   ;(gimp-image-undo-group-start img)

   (gimp-image-add-vectors img vectors -1)

   (aset start 0 0)(aset start 1 0)(aset start 2 0)(aset start 3 0)(aset start 4 0)(aset start 5 0)
   (aset start 6 0)(aset start 7 width)(aset start 8 width)(aset start 9 width)(aset start 10 width)(aset start 11 width)

   (set! stroke-id (car(gimp-vectors-stroke-new-from-points vectors 0 12 start FALSE)))

   (gimp-vectors-stroke-translate vectors stroke-id x y)


   (while (< count segments)
   (begin

   (set! countme (+ countme width))

   ;I'll need this since the add-point-at-end action (later on the loop) creates a new stroke

   (set! stroke-id (aref (cadr(gimp-vectors-get-strokes vectors)) 0))   ;During all the script, this will have only one stroke   

   (gimp-vectors-stroke-rotate vectors stroke-id x y 90)

   ;Here I'll get the X and Y of the last points in the stroke

   (set! pointx (aref (caddr(gimp-vectors-stroke-get-points vectors stroke-id)) vector_length) )
   (set! pointy (aref (caddr(gimp-vectors-stroke-get-points vectors stroke-id)) (+ vector_length 1) ) )

   (set! anchorx (+ countme pointx))
   (set! anchory (+ countme pointy))

   (set! control1x pointx)
   (set! control1y anchory)

   (aset point 0 control1x)
   (aset point 1 control1y)
   (aset point 2 anchorx)
   (aset point 3 anchory)
   (aset point 4 anchorx)
   (aset point 5 anchory)

   (add-point-at-end vectors stroke-id point)

   (set! count (+ 1 count))
   (set! vector_length (+ 6 vector_length))

   ))

   ;end of undo group
   ;(gimp-image-undo-group-end img)

   ;Refresh View
   (gimp-displays-flush)
))

(script-fu-register
   "script-fu-spiral2"
      "<Image>/Shapes/Spiral..."
      "Draw a new spiral"
      "LightningIsMyName (LIMN)"
      "LightningIsMyName (LIMN)"
      "March 2008"
      ""
      SF-IMAGE      "Image"   0
      SF-VALUE      "Number of Segments"   "25"
      SF-VALUE      "width"   "25"

)



Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 30, 2008 1:02 am 

Joined:
Thu Feb 23, 2006 5:38 am

Topics:
Posts: 1627

Find User's Topics
Made use of your ellipse and the copy and rotate paths scripts to develop the animation in this link:

http://www.gimptalk.com/forum/topic/Animated-Circular-Progress-Indicator-30057-1.html

Thank you.

:h:


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 30, 2008 4:13 am 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics
Nice result ccbar!

Important note:
Final Stable release (1.0) and version for gimp 2.2 will be available during the following week featuring some fractal generating scripts.


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Sun Mar 30, 2008 2:51 pm 
GT Moderator

User avatar

Joined:
Thu Dec 29, 2005 5:29 pm

Topics:
Posts: 3892

Find User's Topics
sounds good. thanks!

_________________
secks frum samusluvver:
Image

absolute awesomeness from Greentunic :3 secks frum flamed


Top
 Profile  
 
Online
 Post subject:
PostPosted: Mon Mar 31, 2008 1:12 am 
GT Manager

User avatar

Joined:
Mon Jun 13, 2005 11:15 am

Topics:
Posts: 10074

Find User's Topics
i have some dumb psychological resistance to think in term of numeric xy values (as for chose the center, or width of polygon) when i'm drawing

i mean i can do but i will like even more for new path be automatically centered and based on a simple selection
(ie first user create a circular or squared selection where he like..., then script use the center of selection as the center of the path ,, while the side, or the ray if selection is circular determine the width)

Alexia Death wrote something similar is in the last FX-Foundry pack, but there the shapes are inside but not inscribed in the selection
(and anyway if i'm not wrong in Alexia scripts the polygon are just draw no paths..having as path like in your script is much more handy , even more thank to script 1-2-3-9 that allow to edit quickly the path )

but anyway i like the script and is no so hard visualize a grid or guides to determine the best xy value to be typed to get the center in the right place...is more a psychological resistance then a real issue,

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Is not so hard type the Cartesian coordinates to be used for the path..
.but to make a example is no even so hard type something in a terminal, still if there is something with a GUI that may do the same work i...cought..strictly avoid command line even if result may be quicker.

Similarity is that i clearly see where is a selection, and so my mind has a clear image of the shapes that may be inscribed in that selection, and how they will fit with whatever else is or i plan to add to the the image
while i need a bit more effort to visualize the possible final results if dealing with numeric xy values

_________________
Image

http://www.flickr.com/photos/97844002@N00/


Top
 Profile  
 
Offline
 Post subject:
PostPosted: Mon Mar 31, 2008 6:50 am 
User avatar

Joined:
Tue Aug 21, 2007 8:36 am

Topics:
Posts: 108

Find User's Topics
it can me modified to take the center of the active selection - shouldn't be to hard to figure how to do this.

I can add this option but it will be done only after my big test tomorrow (why do people put a test on april 1?! that's the silliest date! oh well :D)


Top
 Profile  
 
Online
 Post subject:
PostPosted: Mon Mar 31, 2008 3:28 pm 
GT Manager

User avatar

Joined:
Mon Jun 13, 2005 11:15 am

Topics:
Posts: 10074

Find User's Topics
Quote:
it can me modified to take the center of the active selection - shouldn't be to hard to figure how to do this.


what it may be complex can be get the polygon exactly inscribed in the selection, (take the width of selection as ...uff i forget right word now...well as "width" of polygon, meaning for "width" the double of the distance from the polygon center to 1 of its corner that should be equal to the ray of the circular selection...or to the diagonal in case of square selection )

But that Should be complex only for free, rectangular or elliptic selections, in case of square or circular selection should be no problem...just may be needed a warning in case other kind of selection is active,instead then squared or circular

well is possible that may allow a more intuitive and fun use (well at least for me :l:..but i think others may have similar mental setting )

_________________
Image

http://www.flickr.com/photos/97844002@N00/


Top
 Profile  
 
Display posts from previous:  Sort by  

Post new topic Reply to topic
 [ 14 posts ] 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Related Website
Gimp tutorials database
All rights reserved © GimpTalk 2008
forum software by
phpBB