[Solved] Making a diffraction pattern with gradient????

Post questions on how to use or achieve an effect in Inkscape.
kgkg
Posts: 12
Joined: Mon Nov 15, 2010 8:51 pm

[Solved] Making a diffraction pattern with gradient????

Postby kgkg » Wed Dec 01, 2010 7:15 pm

I would like to prepare a diffraction pattern from a grid with the help of gradient tool.
In diffraction, the white light breaks apart to the rainbow colors in radial way like a fan.
It originates from a small point and spans.
One can see the way spreads here https://wiki.brown.edu/confluence/download/attachments/5795/diffraction.jpg?version=1&modificationDate=1183467433000


How can I use the gradient tool to mimic light spreading in different wave lengths ?

SVG file attached

Thanks....
Attachments
diffraction.svg
(7.49 KiB) Downloaded 210 times
Last edited by kgkg on Thu Dec 02, 2010 6:29 am, edited 1 time in total.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Making a diffraction pattern with gradient????

Postby prkos » Wed Dec 01, 2010 10:01 pm

Inkscape doesn't come with a conical gradient option but you're going in the right direction, you have to use several triangular objects and blur them.

If the objects are positioned one next to another like in your drawing you should probably make each one larger so they overlap, so once you blur them there won't be background showing through the edges.

A screenshot of how to fake gradient meshes: http://inkscape.org/screenshots/gallery ... mental.png
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Making a diffraction pattern with gradient????

Postby llogg » Wed Dec 01, 2010 10:56 pm

heathenx came up with a clever work around to get a conical gradient in this episode of screencasters:
http://screencasters.heathenx.org/episode-081/

kgkg
Posts: 12
Joined: Mon Nov 15, 2010 8:51 pm

[Solved] Making a diffraction pattern with gradient????

Postby kgkg » Thu Dec 02, 2010 6:40 am

Thank You Very Much
Making blurred triangles work nicely and using Extensions->Generate from path->interpolate works like a charm (as shown in the inkscape video tutorial above)!
The blurred triangles is more simple to use but the interpolate method gives more "realistic" presentation.
If one uses the interpolate method it should be noted that the middle colors should be on top the one on the sides.
A svg file attached of a rainbow with the interpolate method.

Thanks again.

K
Attachments
RainBowWithInterpolation.png
RainBowWithInterpolation.png (216.91 KiB) Viewed 2154 times
RainBowWithInterpolation.svg
(78.36 KiB) Downloaded 185 times

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: [Solved] Making a diffraction pattern with gradient????

Postby chriswww » Fri Dec 03, 2010 11:05 am

depending on your needs..you can use less blur if you draw a thin rectangle with unset fill, and use tiled clones for rotated objects with changing hue for each step. i created such a tiled clone with 50 clones with angle change about 1.8 and enough hue change per step so you get the whole set of colors. then interpolate and/or blur just a little bit, group, and clip to a suitable final shape.


Return to “Help with using Inkscape”