CaptKirk wrote:Dumb question without reading the UG- why is "green" = 067306 and not 00FF00 (I'm assuming 256 levels of red, green, blue in that value 00 is none of that color, and FF is 100%).
Not dumb.
I didnt want a bright green so added some darker color. On my color picker , notice besides picking a color , you can darken that color with the little vertical slider.
The RGB value for 067306 is 6,115,6
You can see GREEN is not the full 255, but is instead 115. Raising the other two channels, darkens the color.
You can try it here
http://www.colorspire.com/rgb-color-wheel/
thanks
Zeph wrote:No problem. XAMPP installs all that with a few clicks, and some of us have probably installed it already (perhaps several times on various machines).The PHP code is presumably not that many megabytes. Are you using GD to create the gif?
Obviously, that option would only be for advanced users, and your hosted version would work for others.
All of the php code for Nutcracker is currently < 100 kbytes. Image files are another 1.5 mbytes so the entire code would be around 2 mbytes, uncompressed.
When i go to the academy, i have wamp installed and running in case i have any issues getting to the internet.
One issue, i have not got gnuplot ( http://gnuplot.sourceforge.net/demo_4.4/ ) or imagick installed into my Windows 7 box. I have a stand alone gnuplot and imagick so i can build the animation, just not automatically in the web page. I may get this sorted out later. It would eliminate any size limits on the more complicated rgb device i am imagining doing later this year.
On a side note: I have been using gnuplot since 1984. This means through my Memorex, unisys, Sun microsystems, BEA and now oracle days. It is very fast and works well with sed, grep,awk and gnuplot.
For Example: This command file
#
set hidden3d front
set isosamples 25,25
set xyplane at 0
unset key
set palette rgbformulae 31,-11,32
set style fill solid 0.5
set cbrange [-1:1]
set title "Mixing pm3d surfaces with hidden-line plots"
f(x,y) = sin(-sqrt((x+5)**2+(y-7)**2)*0.5)
splot f(x,y) with pm3d, x*x-y*y with lines lt 1 lc rgb "#000000", \
f(x,y) with lines lt -2 notitle
produces this image

Here is another
this input file
# set terminal png transparent nocrop enhanced font arial 8 size 420,320
# set output 'hidden.5.png'
set view 75, 230, 1, 1
set samples 20, 20
set isosamples 20, 20
set contour base
set hidden3d offset 1 trianglepattern 3 undefined 1 altdiagonal bentover
set title "Hidden line removal of explicit surfaces"
set xrange [ -3.00000 : 3.00000 ] noreverse nowriteback
set yrange [ -3.00000 : 3.00000 ] noreverse nowriteback
set zrange [ -1.00000 : 1.00000 ] noreverse nowriteback
splot sin(x) * cos(y)
produces this plot. Hidden line elimination, contours, 3d. And best of all, gnuplot is totally free.

I'm still seeing some colors not "morphing." Even in the gif's below, one starts purple and ends orange as you would expect. The other has three spirals of red, white, and blue. They all start one color and end that same color. I think I'm just not understanding?
Sean, cool, you are very comfortable with gnuplot, which is apparently very powerful.
Do you use use the php ImageMagick library to plot your animations? How does gnuplot come into it? Do you exec() it from PHP under Linux on your web host?
(Now you've got me curious!)
Hi; well if your interested in the php
to call gnuplot in php
$shellCommmand = "gnuplot '" . $gp_file . "'";
$output = system($shellCommmand . " 2>&1");
So if someone has 48 strands on their tree, i will end up with 48 png files drawn in 3d.
to create animated gif in php
$max_i=count($out_file_array); // this has full path to the 48 png files
for ($i=1;$i<=$max_i;$i++)
{
$full = $out_file_array[$i-1];
$frame = new Imagick($full);
$aniGif->addImage($frame);
$frame_delay = $frame_delay/10; // Users passed in their timing in ms, we need hundreths of a second
if(empty($frame_delay)) $frame_delay=10; // if somone forgot to give us a frame timing, use 100ms
$aniGif->setImageDelay($frame_delay); // 5=50ms, 10=100ms
}
$aniGif->writeImages($out_file,true); // $gif_file is based on their model file. MTREE+SEAN.dat => MTREE+SEAN.gif
printf ("",$out_file); // let them see their new masterpiece
thanks
n8huntsman wrote:I'm still seeing some colors not "morphing." Even in the gif's below, one starts purple and ends orange as you would expect. The other has three spirals of red, white, and blue. They all start one color and end that same color. I think I'm just not understanding?
I had stated in an earlier post (i forget where), that i have this logic on the spiral class
If 1 spiral, color is red
if 2 spirals, color is red/white. This was so i could get the barber pole
if 3 spirals, color is red/white/blue. This was because i felt patriotic when i wrote the spiral class 2 weeks ago.
if > 3 strands use the colors that user passed in
That you ask the question is very good! it means you are trying the code.
I will be replacing the hard coded values with a much more complete color selection section.
Does anyone notice something?
as more and more people ask for one more capability the form for customizing the spiral effect is growing. It has almost doubled in the last 3 days. Most of the additional things were my ideas, so you can blame me. Please, keep the suggestions coming.
I expected this .The good news, more possibilities to make any sort of effect you might desire
the bad news, i don't want it to get so complicated that people have a hard time answering all the questions.
I am getting ready to release a gallery of effects link. Basically every effect anyone has created will be shown in the gallery. You will be able to click that image and have all the settings that created it be transferred into your private library. Now you can use it for your own trees. I was thinking this could help peopel not have to answer 30 questions if they find an effect they like.
sean
Ahh, sorry. I read that too. Just so much (4 pages in one day) to take in.
n8huntsman wrote:Ahh, sorry. I read that too. Just so much (4 pages in one day) to take in.
Yep, i think i am writing a novel.
See message #22 in this thread to see what i posted about the new color selection process.
I need to create one page that summarizes all of the pages before it. Then you can just skip all the inermediate posts and get the readers digest version.
So here is the summary of all of the previous threads.
Effect builder now has new options:
1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
0 means , do not have any sparkles.
2) window_degrees: Value 0-360 degres
this is how much of your tree will be displayed.
360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.
thanks
3) Nutcracker now displays timing as it runs
Example:
Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
Making gnuplot command file: : Elapsed time = 11.28435 seconds
Finished gnuplot command file: : Elapsed time = 11.38652 seconds
Calling Gnuplot: : Elapsed time = 11.38672 seconds
Finished Gnuplot: : Elapsed time = 26.79310 seconds
Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds
4) Two new options, background color
use_background Y
background_color #067306
If you answer yes u want a background color, every pixel of your tree will be set to that color.
Next i take whatever animation you have and put it on top of the background.
Ok, those are the major changes since yesterday.
thanks
I have added a glaery on the effects form screen.
This basically goes and finds every gif image that has been created and shows them. I will create a hyperlink that will allow you to click on an image and then copy that effect into your private library. This will save you from answering 20 questions.
Because i make so many releases per day, sometime > 20. I am going to start ending my posts with a summary of all changes. This readers digest version means you kind jump to the end of these threads and not miss anything.
we will see if this helps.
NUTCRACKER SUMMARY OF CHANGES
Effect builder now has new options:
1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
0 means , do not have any sparkles.
2) window_degrees: Value 0-360 degres
this is how much of your tree will be displayed.
360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.
thanks
3) Nutcracker now displays timing as it runs
Example:
Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
Making gnuplot command file: : Elapsed time = 11.28435 seconds
Finished gnuplot command file: : Elapsed time = 11.38652 seconds
Calling Gnuplot: : Elapsed time = 11.38672 seconds
Finished Gnuplot: : Elapsed time = 26.79310 seconds
Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds
4) Two new options to set background color
use_background Y
background_color #067306
If you answer yes u want a background color, every pixel of your tree will be set to that color.
Next i take whatever animation you have and put it on top of the background.
5) Added the Gallery of effects
to the effects form. Now you can see all other users effects.
END OF SUMMARY
Thanks
Doing the current meter, i found a bug in my color transformation code. Nutcracker never uses r,g,b anywhere except whenit is all finished. Everything is in HSV, http://en.wikipedia.org/wiki/HSL_and_HSV .
The Hue allows me to morph colors easily. Well when i morphed from one color to the second, H1,S1,V1 into H2,S2,V2 i morphed the hue (H1=>H2) but i set the S and V to 100%. Why? I don't remember. Maybe because at the time i liked bright colors. S=100% Indicates full saturation of the Hue, V=100% is full brightness.
I fixed the logic so now all three are morphing correctly.
What does this mean? It means before you could not do grays. You also couldnt fade a bright red down to black. Now you can.
Here is a gray color scheme
username f
user_target AA
effect_class spirals
effect_name GRAY_CHECK
number_spirals 4
number_rotations 2
spiral_thickness 2
window_degrees 360
start_color #CFCFCF
end_color #A3A3A3
frame_delay 22
direction cw
sparkles
use_background n
background_color #0B3802
submit Submit Form to create your target model

And here is a color hue , leaving the hue and fading to black.
_POST
username f
user_target AA
effect_class spirals
effect_name GRAY_CHECK
number_spirals 4
number_rotations 2
spiral_thickness 2
window_degrees 360
start_color #FA053E
end_color #3D3637
frame_delay 22
direction cw
sparkles
use_background n
background_color #0B3802
submit Submit Form to create your target model

Here is readers digest of all changes so far this last week:
NUTCRACKER SUMMARY OF CHANGES
Effect builder now has new options:
1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
0 means , do not have any sparkles.
2) window_degrees: Value 0-360 degres
this is how much of your tree will be displayed.
360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.
thanks
3) Nutcracker now displays timing as it runs
Example:
Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
Making gnuplot command file: : Elapsed time = 11.28435 seconds
Finished gnuplot command file: : Elapsed time = 11.38652 seconds
Calling Gnuplot: : Elapsed time = 11.38672 seconds
Finished Gnuplot: : Elapsed time = 26.79310 seconds
Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds
4) Two new options to set background color
use_background Y
background_color #067306
If you answer yes u want a background color, every pixel of your tree will be set to that color.
Next i take whatever animation you have and put it on top of the background.
5) Added the Gallery of effects
to the effects form. Now you can see all other users effects.
6) Added current meter to show how much DC current is being drawn by your animation
7) Fixed color bug. In H1,S1,V1 => H2,S2,V2 transformations, i was only modifying the hue.
END OF SUMMARY

