It is currently Fri Mar 29, 2024 8:42 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 4:22 pm  (#1) 
Offline
GimpChat Member

Joined: Dec 19, 2015
Posts: 46
I guess I feel like I'm Michael Palin from the following scene, but....

www.youtube.com Video from : www.youtube.com


Are there still MATHMAP filters out there that people still use? If so, drop the code into this post and I'll see what I can do.

Souphead.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 4:28 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
Simple spin illusion:

#Kitaoka Spin Illusion V0.0
#Written by step7 (2012)
#Renders positional displacement illusion "Spinning Sectors"
#based on Akiyoshi Kitaoka's "Rotating Snakes"
#
#Wiring:
#None
#
#User Values:
#Just play..
#
#Contact me about the filter on Gimp Chat Forum or Mathmap Google Group
#
filter KittyRings (image in, float sectors:10-80 (30), float zoom:1-30 (8),float inner_radius:0-2 (0), float outer_radius:0-2 (1), int R1:0-255 (113),int G1:0-255 (0),int B1:0-255 (113), int R2:0-255 (0),int G2:0-255 (255),int B2:0-255 (0))v=(sectors*a/(pi*2))+(floor(log(r)*zoom)*0.5); v=v-floor(v);out=rgbaColor(0,0,0,0);if inintv(r,inner_radius,outer_radius) then if inintv(v,0.15,0.5) then out=rgbaColor(R1/255,G1/255,B1/255,1);end;if inintv(v,0.5,0.65) then out=rgbaColor(1,1,1,1);end; if inintv(v,0.65,1) then out=rgbaColor(R2/255,G2/255,B2/255,1);end;end;out end


Attachments:
si.png
si.png [ 78.21 KiB | Viewed 6461 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 4:34 pm  (#3) 
Offline
GimpChat Member

Joined: Dec 19, 2015
Posts: 46
That was fast! Not even enough time to watch the video. Let's see what I can do.

Souphead.


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 4:49 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
If you can get rid of the edge aliasing, that would be a cool plus Souphead. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 10:21 pm  (#5) 
Offline
GimpChat Member

Joined: Dec 19, 2015
Posts: 46
OK it's out there in Testing/Souphead/Kitaoka spin illusion. I'll have to think about how to anti-alias the edges though.

Souphead.


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Sun Jan 24, 2016 10:43 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
Wow; the filter runs near instantaneously. Yea; the aliasing is like mathmap's output. Must be the algorithm, but the result's pretty cool none the lest. Ran cont. droste too for the result. :)


Attachments:
sd.png
sd.png [ 854.49 KiB | Viewed 6383 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 1:34 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14804
Location: roma, italy
glad to have another very effective G'MIC coder; why don't you have a look to all "open challenges" on G'MIC (starting maybe from Smart Deblur which has been already implemented in an external fee SW Application - but first release was free...)?

edit: and the source code of first release seems to be available too, I guess in C, to start with

_________________
"Where am I ?"


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 3:41 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
I hope you don't mind, but I've changed the controls a little bit : I've replace the last 6 parameters (R1,G1,B1 and R2,G2,B2), replacing them by color selectors instead.
Please tell me if you prefer I don't touch your file in the future :)


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 8:27 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
I was going to as for color change settings. Cool. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 12:36 pm  (#10) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
dinasset wrote:
glad to have another very effective G'MIC coder; why don't you have a look to all "open challenges" on G'MIC (starting maybe from Smart Deblur which has been already implemented in an external fee SW Application - but first release was free...)?

edit: and the source code of first release seems to be available too, I guess in C, to start with


Agreed, especially one who can do mathmap conversions ;)

I can't help thinking though, often the main things needed to create something are the will to attempt it and some patience/persistence. The technical part can be learned... so dinasset - since I've seen you do G'MIC in the past - do you have the will to try?


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 1:52 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14804
Location: roma, italy
thanks, GC, for your nice words, I did some G'MIC filters, but what I'm asking here for is involving too much mathematics for me, that's the reason I addressed this request to Souphead.
I'm hoping -even if it's not Mathmap- he can have a look to the source of the first version of Smart Deblur, see what the second one -fee- does and maybe try to create a G'MIC version of this very useful filter (many photographers have this problem, and there is no free sw available now (and easily usable) for such a task).
I hope you continue creating your nice G'MIC filters, I use them...

_________________
"Where am I ?"


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 3:28 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Mar 16, 2015
Posts: 613
Location: On Earth,specifically Queensland,Australia
Image I ran Kitoaka and Droste on separate layers and combined them. The original image was a tile from a tut by He4rty. You can see a section of the original tile bottom right corner.

_________________
Image


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Mon Jan 25, 2016 11:13 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
Why not Circle to Line perspective (for certain textures, it gives better results then straight perspective).

Details at Google group; code below:

filter moon2panorama(
         image in,
         bool center_help (0),
         float center_x: -20-20 (0),
         float center_y: -20-20 (0),
         float span: 0-1450 (360),
         float shift_x: -200-200 (0),
         float shift_y: -200-200 (0)
     )
     scaled = ri:[x, y/(1+9*center_help)]/W*span;
     shifted = (scaled - ri:[shift_x, shift_y])*pi/180;
     remapped = I*exp(-I*shifted);
     centered = (remapped*0.8+ri:[center_x, center_y]/100)*min(X, Y);
     if center_help && abs(y/Y) < 0.01 then
         rgbColor(1, 1, 0)
     else
         in(xy:[centered[0], centered[1]])
     end
end


https://groups.google.com/forum/#!searc ... 9ekYou--gJ


Attachments:
cl_jb.jpg
cl_jb.jpg [ 640.7 KiB | Viewed 1884 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Tue Jan 26, 2016 12:54 am  (#14) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7696
Location: On the other side of this screen
Image
Used continuous droste on one layer then your kitaoka spin illusion filter and merged. Similar to what Issabella sorry Kimba did.

_________________


Last edited by sallyanne on Thu Jan 28, 2016 5:45 am, edited 1 time in total.

Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Tue Jan 26, 2016 1:29 am  (#15) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7696
Location: On the other side of this screen
Image

_________________


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Thu Jan 28, 2016 10:19 pm  (#16) 
Offline
GimpChat Member

Joined: Dec 19, 2015
Posts: 46
OK, moon2panorama will be out there in Testing/Souphead in a few hours. I'll take that one and use it for 1.6.9 testing as it uses some of the newer features and will hopefully get me used to the syntax. Do you have any actual moon pictures to try it on?

I'll also include the "manual" by Edgar Bonet here so people know how to use it. (note it starts with using regular GIMP first):

*** The manual:

1.- Horizontally resize the canvas to make room for the panoramic view

- menu: Image / Canvas Size...
- disconnect Width from Height (small chain)
- set a comfortable width, around 3.5 times the Moon's diameter
- click on Center, then Resize

Ideally, I would like the Moon's perimeter to be rendered at the
same resolution as in the original image. Then I would set the
canvas width to pi*moon_diameter_in_px*span/360, where span is the
horizontal span (in degrees) of the panorama you want to make. You
probably want to have a span of more than 360 deg in order to get
some overlap of the ends.

2.- Resize the working layer to the canvas size

- first make sure the selected background color in the toolbox is
black
- menu: Layer / Layer to Image Size

3.- Go to the moon2panorama in G'MIC

4.- If the horizon is wavy, fix it with the center_* controls

- vertically center the horizon with the shift_y control
- check center_help: this will amplify the vertical variations and give you a reference horizontal line
- use center_x and center_y to remove the waviness
- uncheck center_help when done

This waviness comes from the fact that the Moon was not perfectly
centered in the original image. If it was centered, then you don't
need this step. You will get a more accurate (but slower) correction
if you uncheck Fast Preview in the Settings tab. If some residual
waviness persists, it's probably due to the Moon not being
perfectly round (or perfectly full).

5.- Tune to taste

- the span slider controls how much of the Moon perimeter you will
have in the panorama, in degrees.
- shift_x controls what is in the center of the panorama. By default
(when set to 0 degrees) it will be whatever was at the top of the
original image.
- shift_y controls the ratio of land/sky in the image. Beware that
only the area close to the limb will be rendered with adequate
resolution, features far from the limb have to be upscaled and
will show degraded resolution.

6.- Click on OK, crop as needed and enjoy

Souphead.

PS, I'm not ignoring your comments dinasset. I took a look at the smart blur code and the G'MIC Language reference and have a few thoughts on this but it's too late tonight to go more into it now.


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Fri Jan 29, 2016 12:59 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14804
Location: roma, italy
"PS, I'm not ignoring your comments dinasset. I took a look at the smart blur code and the G'MIC Language reference and have a few thoughts on this but it's too late tonight to go more into it now."
Thanks Souphead, I hope you succeed.

_________________
"Where am I ?"


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Fri Jan 29, 2016 1:08 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
The Circle/Line perspective does work, but do have another additional request: Wrap feature like you did for the other preset. Still impressive that you are able to convert these cool Mathmap presets into G'MIC. Thanks Souphead.

edit:

Also, if layer has an alpha channel, the result is a pure blank layer. :)


Attachments:
garlic.jpg
garlic.jpg [ 113.24 KiB | Viewed 1796 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Fri Jan 29, 2016 8:04 am  (#19) 
Offline
GimpChat Member

Joined: Dec 19, 2015
Posts: 46
I wasn't sure if "wrap/reflect/rotate" has context on this one but I added it. Really once you have written it once, it's just a cut and paste to put it in another.

Not sure why I forgot about the alpha but it's there too (on the next rebuild).

Souphead.


Top
 Post subject: Re: Ninepence for MATHMAP.
PostPosted: Fri Jan 29, 2016 8:18 am  (#20) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Hi souphead, not sure if this applies here but there are a few ways of altering "canvas" in gmic. If interested take a look at -resize (and it's relatives), -expand_xy, -crop, -image. Even automatic centre is probably possible... extra work of course ;)


Top
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Mathmap

4

No new posts Attachment(s) MathMap

11

No new posts MathMap in 2.10.18

2

No new posts I made a new MathMap filter

21

No new posts [solved] Mathmap folder in Preferences

12



* Login  



Powered by phpBB3 © phpBB Group