NorCaliGirl Posted January 22, 2008 Share Posted January 22, 2008 Looking for a curly q generator thing to make curls like this (or there abouts): Quote Link to comment Share on other sites More sharing options...
MadJik Posted January 22, 2008 Share Posted January 22, 2008 Why not if only you(someone) could provide some kind of formula (Fractal?)... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
oma Posted January 22, 2008 Share Posted January 22, 2008 @madjik try the forumula for Fibonacci spirals http://en.wikipedia.org/wiki/Fibonacci_number Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
david.atwell Posted January 22, 2008 Share Posted January 22, 2008 That appears to be made using Photoshop brushes, I would think. But I'm not sure. Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
barkbark00 Posted January 22, 2008 Share Posted January 22, 2008 Here's some VB code for a spiral. Not sure what it looks like though... Also: Archimedean Spiral Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
oma Posted January 22, 2008 Share Posted January 22, 2008 actually its not too hard to do something almost like this already. use the tree gen plug in you'll need to do the end of each branch separately with twist but if you keep the number of branches low and just copy and move around on several layers then run conditional hue/saturation (like in ASH lava lamp tut) you could come up with something fairly similar. a bit more work to get the first set of curls done, but it would be your own work entirely not just a brush. Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
pyrochild Posted January 22, 2008 Share Posted January 22, 2008 Hmmm... Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
david.atwell Posted January 22, 2008 Share Posted January 22, 2008 Uh oh. The wheels are turning. :-P Prunes, anyone? Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
oma Posted January 22, 2008 Share Posted January 22, 2008 pyrochild is that a hmmm you don't think so or yes its possible to modify. if you do modify I'd like to be able to have longer branch ratio to trunk size. as it stands now using this method you get chunky results but fairly similar and oh so time consuming. Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
pyrochild Posted January 22, 2008 Share Posted January 22, 2008 pyrochild is that a hmmm you don't think so or yes its possible to modify. if you do modify I'd like to be able to have longer branch ratio to trunk size. as it stands now using this method you get chunky results but fairly similar and oh so time consuming. It's a "hmmm, I wonder if I can do this...." If I do take it on, though, it'll be at least a couple months out, though. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
The_Lionhearted Posted January 23, 2008 Share Posted January 23, 2008 I would love help doing something like this. I've been wishing I can do stuff like that ever since I started with Paint.NET...and I gave up on it cause I thought I needed brushes. If someone could code something like that, I would probably have to give them serious props. Quote My Gallery Link to comment Share on other sites More sharing options...
MiguelPereira Posted January 23, 2008 Share Posted January 23, 2008 pyrochild is that a hmmm you don't think so or yes its possible to modify. if you do modify I'd like to be able to have longer branch ratio to trunk size. as it stands now using this method you get chunky results but fairly similar and oh so time consuming. It's a "hmmm, I wonder if I can do this...." If I do take it on, though, it'll be at least a couple months out, though. OMG do this, but please finish your current work... Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
MadJik Posted January 23, 2008 Share Posted January 23, 2008 Here's some VB code for a spiral. Not sure what it looks like though...Also: Archimedean Spiral Quick Codelab, need more time to make it faster... int Amount1=15; //[0,1000]a (/100) int Amount2=15; //[0,1000]b (/100) int Amount3=100; //[0,1000]quantity of points (*100) double e = 2.718281828; double kPi = 3.14159265358979 / 620.0; void Render(Surface dst, Surface src, Rectangle rect) { double X,Y; double Xs, Ys; // Delete any of these lines you don't need Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); long cX = (long)(((selection.Right - selection.Left) / 2)+selection.Left); long cY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top); double a = (double)Amount1 / 100.0; double b = (double)Amount2 / 100.0; long MaxiP = Amount3 * 100; ColorBgra PrimColor = (ColorBgra)EnvironmentParameters.PrimaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; SolidBrush Brush1 = new SolidBrush(Color.FromArgb(PrimColor.A, PrimColor.R, PrimColor.G, PrimColor.); Pen Pen1 = new Pen(Brush1, BrushWidth); // Copy existing image (source) to destination for (int y = rect.Top; y < rect.Bottom; ++y) for (int x = rect.Left; x < rect.Right; ++x) dst[x, y] = src[x, y]; Graphics g = new RenderArgs(dst).Graphics; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.Clip = new Region(rect); Xs = cX + (a * (Math.Cos(0)) * Math.Pow(e , (b * 0))); Ys = cY - (a * (Math.Sin(0)) * Math.Pow(e , (b * 0))); for (int i = 1; i < MaxiP; ++i) { double ang = kPi * i; X = cX + (a * (Math.Cos(ang)) * Math.Pow(e , (b * ang))); Y = cY - (a * (Math.Sin(ang)) * Math.Pow(e , (b * ang))); g.DrawLine(Pen1, (float)X, (float)Y, (float)Xs, (float)Ys); Xs=X; Ys=Y; } } pyrochild is that a hmmm you don't think so or yes its possible to modify. if you do modify I'd like to be able to have longer branch ratio to trunk size. as it stands now using this method you get chunky results but fairly similar and oh so time consuming. It's a "hmmm, I wonder if I can do this...." If I do take it on, though, it'll be at least a couple months out, though. I would be pleased if any other coder could improve this plugin, I could cooperate and give any help for that one! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
david.atwell Posted January 23, 2008 Share Posted January 23, 2008 Crash: File: C:\Program Files\Paint.NET\Effects\curlicue.dll Effect Name: PaintDotNet.Effects.UserScript Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.OverflowException: Overflow error. at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawLine(Pen pen, Single x1, Single y1, Single x2, Single y2) at PaintDotNet.Effects.UserScript.Render(Surface dst, Surface src, Rectangle rect) at PaintDotNet.Effects.UserScript.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() --- End of inner exception stack trace --- at PaintDotNet.Effects.BackgroundEffectRenderer.Join() at PaintDotNet.Effects.BackgroundEffectRenderer.Start() at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClassa.b__8(Object sender, EventArgs e) Now, I did compile the CodeLab into a DLL, which I've never done before, so it could be my fault, I suppose... Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
pyrochild Posted January 23, 2008 Share Posted January 23, 2008 Crash:Now, I did compile the ScriptLab into a DLL, which I've never done before, so it could be my fault, I suppose... WrongLab Anyhoo, the crash isn't your fault, the plugin is, after all, only a "Quick CodeLab" @MadJik: you can use Math.PI and Math.E rather than defining them yourself Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Mike Ryan Posted January 23, 2008 Share Posted January 23, 2008 I got it to build fine, and havent had any problems. As you said though, it is quite slow. The only thing is I havent been able to achieve the correct effect yet. Oh well, I am still playing with it! Quote Link to comment Share on other sites More sharing options...
oma Posted January 23, 2008 Share Posted January 23, 2008 actually although the two spirals are similar the original spiral example is more rounded along the back edge and doesn't just spiral outwards from the centre as in the archimedean spiral. its more like a tailors french curve. pyro if you take a long time to do this one is it possible to work in these alternatives? http://mathworld.wolfram.com/CornuSpiral.html Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
Mike Ryan Posted January 23, 2008 Share Posted January 23, 2008 got a crash! Same as David.Atwell's, and it seems to be when adding to many points to the swirl Quote Link to comment Share on other sites More sharing options...
pyrochild Posted January 23, 2008 Share Posted January 23, 2008 pyro if you take a long time to do this one is it possible to work in these alternatives?http://mathworld.wolfram.com/CornuSpiral.html I'll look into it, but the math in there is more advanced than anything I've learned in school. I'll have to try to learn it on my own or just wait for the math class to catch up :? Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
oma Posted January 23, 2008 Share Posted January 23, 2008 no problem I'd help you with the math but its been over 40 years since I've done any of this type of work. just barely remember any of it, get the odd snippet of inspiration once in awhile but the old noodle just doesn't function like it used to. Quote My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
MiguelPereira Posted January 23, 2008 Share Posted January 23, 2008 I'll look into it, but the math in there is more advanced than anything I've learned in school. I'll have to try to learn it on my own or just wait for the math class to catch up :? no wonder that's college level math, I recognized it from my own classes... but... are you in college? Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
MadJik Posted January 23, 2008 Share Posted January 23, 2008 no problem I'd help you with the math but its been over 40 years since I've done any of this type of work. just barely remember any of it, get the odd snippet of inspiration once in awhile but the old noodle just doesn't function like it used to. Could you explain the formulas (3) and (5) in the link you gave earlier? Especially what is 'du' ? http://mathworld.wolfram.com/CornuSpiral.html Thanks @all: bug could be due to the Amount2 in the first version... this is a second version (could still have bugs!) new: ...two curves (primary color + secondary color) ...Amount1 for X / Amount2 for Y (should solve previous bug!) ...Precalculation in tables (faster) next to do: ...symetry (like Cornu's curve) ...center offset ...randomisation? int Amount1=50; //[0,1000]a (/100) int Amount2=25; //[0,1000]b (/100) int Amount3=10; //[0,1000]quantity of points (*100) bool init = false; int sAmount1=-1; int sAmount2=-1; int sAmount3=-1; double kPi = Math.PI / 640.0; void Render(Surface dst, Surface src, Rectangle rect) { int Xa1,Ya1,Xa2,Ya2; int Xb1,Yb1,Xb2,Yb2; // Delete any of these lines you don't need Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); long cX = (long)(((selection.Right - selection.Left) / 2)+selection.Left); long cY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top); double ax = (double)Amount1 / 100.0; double ay = (double)Amount2 / 100.0; double b = 15.0 / 100.0; long MaxiP = Amount3 * 100; if ((!init) || (sAmount1 != Amount1) || (sAmount2 != Amount2) || (sAmount3 != Amount3)) { init = false; sAmount1 = Amount1; sAmount2 = Amount2; sAmount3 = Amount3; } ColorBgra PrimColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra BackColor = (ColorBgra)EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; SolidBrush Brush1 = new SolidBrush(Color.FromArgb(PrimColor.A, PrimColor.R, PrimColor.G, PrimColor.); SolidBrush Brush2 = new SolidBrush(Color.FromArgb(BackColor.A, BackColor.R, BackColor.G, BackColor.); Pen Pen1 = new Pen(Brush1, BrushWidth); Pen Pen2 = new Pen(Brush2, BrushWidth); // Calculate the X,Y coords of the curve int[] sx1 = new int[1 + MaxiP]; int[] sy1 = new int[1 + MaxiP]; int[] sx2 = new int[1 + MaxiP]; int[] sy2 = new int[1 + MaxiP]; if (!init) { for (int j = 0; j < MaxiP; j++) { double ang = kPi * j * 10; double kEx = ax * Math.Pow(Math.E , (b * ang)); double kEy = ay * Math.Pow(Math.E , (b * ang)); sx1[j] = (int)(cX + kEx * Math.Cos(ang)); sx2[j] = (int)(cX - kEx * Math.Cos(ang)); sy1[j] = (int)(cY + kEy * Math.Sin(-ang)); sy2[j] = (int)(cY - kEy * Math.Sin(-ang)); } init = false; } // Copy existing image (source) to destination for (int y = rect.Top; y < rect.Bottom; ++y) for (int x = rect.Left; x < rect.Right; ++x) dst[x, y] = src[x, y]; Graphics g = new RenderArgs(dst).Graphics; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.Clip = new Region(rect); Xa2 = sx1[0]; Ya2 = sy1[0]; Xb2 = sx2[0]; Yb2 = sy2[0]; for (int i = 1; i < MaxiP; ++i) { Xa1 = sx1[i]; Ya1 = sy1[i]; Xb1 = sx2[i]; Yb1 = sy2[i]; g.DrawLine(Pen1, Xa1, Ya1, Xa2, Ya2); g.DrawLine(Pen2, Xb1, Yb1, Xb2, Yb2); Xa2 = Xa1; Ya2 = Ya1; Xb2 = Xb1; Yb2 = Yb1; } } Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Mike Ryan Posted January 23, 2008 Share Posted January 23, 2008 It is still crashing if you increas the third amount too much Quote Link to comment Share on other sites More sharing options...
TheSwimmer Posted January 23, 2008 Share Posted January 23, 2008 Same error.... adjusting the third amount. File: C:\Program Files\Paint.NET\Effects\CurlyQ.dll Effect Name: PaintDotNet.Effects.UserScript Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.OverflowException: Overflow error. at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) at PaintDotNet.Effects.UserScript.Render(Surface dst, Surface src, Rectangle rect) at PaintDotNet.Effects.UserScript.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length) at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() --- End of inner exception stack trace --- at PaintDotNet.Effects.BackgroundEffectRenderer.Join() at PaintDotNet.Effects.BackgroundEffectRenderer.Start() at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClassa.b__8(Object sender, EventArgs e) Quote Link to comment Share on other sites More sharing options...
Stephan Posted January 23, 2008 Share Posted January 23, 2008 Very simple solution: Limit the third... I built Madjiks' into a DLL, and it works great Angle chooser, anyone? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.