Simple spectrometer

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
Linvincible
Posts: 95
Joined: Sat Sep 25, 2004 5:01 am

Simple spectrometer

Post by Linvincible »

Hi guys,

first of all let me congratulate Andy for the great job he's done in this visualization program! I was so impressed by the eval version that I BOUGHT the gold one! Wow, I hadn't bought any software in YEARS !!!

Here's my question:
has anyone done a script that would display a simple spectrometer?
Something that would stop rotations&all and display in full screen a coll spectrum view?
that would be to sidplay on the TV while I watch a movie on the beamer ;o)

thanks a lot to anyone who can advise me on what waves/flowfields and various commands to use because I'm not brave enough to discover'em all by myself!

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

Welcome Aboard.

Take a look in the WaveShapes folder and you'll see an "SM Spectrometer" effect in there. This to my knowledge is the simple way to draw it. "Box Spectrometer" shows how to do these in bar-form. Andy made another type called Spectrum 55, which you should be able to find in the Gold subfolder in the WaveShapes folder. As you might be able to tell, it expands on the idea quite further.

There are IIRC a couple more, so take a look if you want to.

If you have any code questions, don't hesitate to ask me.

BTW, toggle the "C" key to control whether you want the waveshape display to be in slideshow mode or keep it to whever you choose.
"God is syntax."

Linvincible
Posts: 95
Joined: Sat Sep 25, 2004 5:01 am

Post by Linvincible »

thanks, that was great help for the beginner I am!

another question : is there a way to turn the forcefield completely off?
else I'll cycle through them to see wich one suits the best what I have in mind

what do you mean by IIRC (english is not my mother tongue...) ?

thanks

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

Sorry about that.

It means "If I remember correctly".
"God is syntax."

Linvincible
Posts: 95
Joined: Sat Sep 25, 2004 5:01 am

finally got it!

Post by Linvincible »

thanks Jay for your advices, I could do what I wanted

here's the waveshape :
(it's a modified SM spectrometer I just called it "SM spectrometer asym")

*********************************************************
Aspc=0,
Stps=40,
ConB=1,

A0="2", // Height scale
A1="3 + rnd( 3 )", // Thickness

X0=" -0.95 " ,
Y0=" A0 * s * (fft(0.025)) - 1",


X1=" -0.9 " ,
Y1=" A0 * s * (fft(0.05)) - 1",


X2=" -0.85 " ,
Y2=" A0 * s * (fft(0,075)) - 1",


X3=" -0.8 " ,
Y3=" A0 * s * (fft(0.1)) - 1",


X4=" -0.75 " ,
Y4=" A0 * s * (fft(0.125)) - 1",


X5=" -0.7 " ,
Y5=" A0 * s * (fft(0.15)) - 1",


X6=" -0.65 " ,
Y6=" A0 * s * (fft(0.175)) - 1",


X7=" -0.6 " ,
Y7=" A0 * s * (fft(0.2)) - 1",


X8=" -0.55 " ,
Y8=" A0 * s * (fft(0.225)) - 1",


X9=" -0.5 " ,
Y9=" A0 * s * (fft(0.25)) - 1",


X10=" -0.45 " ,
Y10=" A0 * s * (fft (0.275)) - 1",


X11=" -0.4 " ,
Y11=" A0 * s * (fft (0.35)) - 1",


X12=" -0.35 " ,
Y12=" A0 * s * (fft (0.325)) - 1",


X13=" -0.3 " ,
Y13=" A0 * s * (fft (0.35)) - 1",


X14=" -0.25 " ,
Y14=" A0 * s * (fft (0.375)) - 1",


X15=" -0.2 " ,
Y15=" A0 * s * (fft (0.4)) - 1",


X16=" -0.15 " ,
Y16=" A0 * s * (fft (0.425)) - 1",


X17=" -0.1 " ,
Y17=" A0 * s * (fft (0.45)) - 1",


X18=" -0.05 " ,
Y18=" A0 * s * (fft (0.475)) - 1",


X19=" 0.0 " ,
Y19=" A0 * s * (fft (0.5)) - 1",


X20=" 0.05 " ,
Y20=" A0 * s * (fft(0.525)) - 1",


X21=" 0.1 " ,
Y21=" A0 * s * (fft(0.55)) - 1",


X22=" 0.15 " ,
Y22=" A0 * s * (fft(0.575)) - 1",


X23=" 0.2 " ,
Y23=" A0 * s * (fft(0.6)) - 1",


X24=" 0.25 " ,
Y24=" A0 * s * (fft(0.625)) - 1",


X25=" 0.3 " ,
Y25=" A0 * s * (fft(0.65)) - 1",


X26=" 0.35 " ,
Y26=" A0 * s * (fft(0.675)) - 1",


X27=" 0.4 " ,
Y27=" A0 * s * (fft(0.7)) - 1",


X28=" 0.45 " ,
Y28=" A0 * s * (fft(0.725)) - 1",


X29=" 0.5 " ,
Y29=" A0 * s * (fft(0.75)) - 1",


X30=" 0.55 " ,
Y30=" A0 * s * (fft (0.775)) - 1",


X31=" 0.6 " ,
Y31=" A0 * s * (fft (0.8)) - 1",


X32=" 0.65 " ,
Y32=" A0 * s * (fft (0.825)) - 1",


X33=" 0.7 " ,
Y33=" A0 * s * (fft (0.85)) - 1",


X34=" 0.75 " ,
Y34=" A0 * s * (fft (0.875)) - 1",


X35=" 0.8 " ,
Y35=" A0 * s * (fft (0.9)) - 1",


X36=" 0.85 " ,
Y36=" A0 * s * (fft (0.925)) - 1",


X37=" 0.9 " ,
Y37=" A0 * s * (fft (0.95)) - 1",


X38=" 0.95 " ,
Y38=" A0 * s * (fft (0.975)) - 1",


X39=" 1.0 " ,
Y39=" A0 * s * (fft (1)) - 1",


LWdt=" A1 ",

C0="s"

Pen=" C0 ",

Meta="reactive=5, detail=5, density=5, morphable=3",

Vers=260

********************************************************

doesn't give a good result on all colormaps so I created this one:

********************************************************
H="sin(t/10)",

S="(1-i^.7)",

V="i^2",

Vers=100

********************************************************

Also a still flowfield

********************************************************
Aspc=1,

srcX="X",
srcY="Y",
Vers=100
********************************************************

and a script to use all that

********************************************************
SetParticlesEnabled( false );
SetSpritesEnabled( false );
SetWaveShapeSlideShow( false );
SetColorMapSlideShow( false );
SetFlowFieldSlideShow( false );

SetWaveShape( "SM spectrometer asym");
SetColorMap( "Cycling");
SetFlowField("Still");
********************************************************

doing all that gave me a better viw of the amazing capabilities of the program...wow I just did what I wanted with the most basic functions ever !!! So many parameters and things changing the graphon the same time, amazing....Really have to play with it MUCH MORE to do better things !!!

I think I have a right for lunch now ;o)

Linvincible
Posts: 95
Joined: Sat Sep 25, 2004 5:01 am

flowfields

Post by Linvincible »

hey in fact no prob with the flowfields!
I thought the referential changed that's why I didn't want to use any
but the wave still starts on the same place so it's fine!
wow, we can even make a spectrometer beautiful!

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

I do enjoy your take on the spectometer.

This looks like an almost solid wave wall billowing up against the screen.

By the way, you don't even need to make a script to freeze any of the slideshows. The "F" key will do this. The "G" key will, of course, start it up again.
"God is syntax."

Linvincible
Posts: 95
Joined: Sat Sep 25, 2004 5:01 am

shortcuts

Post by Linvincible »

thanks :D

about the shortcuts: I just couldn't remember them before I thought of the pattern they would do on an QWERTY keyboard! these foreigners and their stupid keyboards...
if anybody else tries this spectrometer : better use the colorwheel colormap than the one I copied, just slow it down a bit
using a sinus was not very clever as we see some colors much shorter than others!
in fact any colormap with a black background will do as long as the colors dissolve fast enough :wink:

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

In regards to your colormap, I maintain that it's not the func you use--i.e. sin,cos, whatever--but rather the time factor (the "t" value in the ColorMap "dialect" of the code).
Say you wanna use a factor of t*.5, using specifically for the sake of this example the "*" operator. If you want to slow it down, simply make the number smaller, i.e. .025 or .005. I would go in this order (^*+-/) as the value you want to apply to the T factor increases. IOW, whole numbers can be used with - or / if you don't want transitions that'll make you barf ;).
"God is syntax."

Post Reply