Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

My warning label generator... yeah, I was bored.

Status
Not open for further replies.





Great job on the label generator.

Has anyone printed one of these out and put it on their laser? I'm curious to find a good foil label size for these.
 
Very nice. Now you should get foil labels, print these out to order and put a few dollars in your pocket.
 
Well im not a seller kinda guy and we do use the labels at work for work.
I'm not so sure they would care for a "Laser Larry's label sales" at work. :)
 
This is cool. And it's a good way to pass some time if you're really bored. I speak from experience.
 

Thanks.

And this reminds me... I still need to do different warning texts for the different classes, if anyone knows what the official warnings are for the "old" system. If not, I'll just make something up.

-Trevor
 
I love it! Is there any way to make the shapes anti-alias or higher resolution? The edges seem to jagged to me. =/ Over all nice job though!

Thanks a bunch,
-Zachary
 
I love it! Is there any way to make the shapes anti-alias or higher resolution? The edges seem to jagged to me. =/ Over all nice job though!

Thanks a bunch,
-Zachary

I have anti-aliasing turned on, but the oval never wanted to anti-alias. I'll poke around.

-Trevor
 
Maybe consider making the oval and danger logo in an image editing program, then plop it in there with your script since the "danger" part never changes.

-Zachary
 
Thanks hak! :)

Currently working on AA... script may act slightly wonky for the next few minutes while I work on it.

-Trevor

EDIT: Done. :)
 
Last edited:
very nice work!

only a thing...
which algorithm do you use to convert the wavelenght into rgb color?
the generated colors have a low saturation... (imo)
i think this algorithm is better (written in c#, uses Bruton algorithm)
Code:
private int factorAdjust(double Color, double Factor, int IntensityMax, double Gamma)
{
	if (Color == 0.0)
	{
		return 0;
	}
	else
	{
		return (int)Math.Round(IntensityMax * Math.Pow(Color * Factor, Gamma));
	}
}
private Color getColorFromWaveLength(int Wavelength){
  double Gamma = 1.00;
  int IntensityMax = 255;
  double Blue;
  double Green;
  double Red;
  double Factor;

  if(Wavelength >= 350 && Wavelength <= 439){
   Red	= -(Wavelength - 440d) / (440d - 350d);
   Green = 0.0;
   Blue	= 1.0;
  }else if(Wavelength >= 440 && Wavelength <= 489){
   Red	= 0.0;
   Green = (Wavelength - 440d) / (490d - 440d);
   Blue	= 1.0;
  }else if(Wavelength >= 490 && Wavelength <= 509){
   Red = 0.0;
   Green = 1.0;
   Blue = -(Wavelength - 510d) / (510d - 490d);

  }else if(Wavelength >= 510 && Wavelength <= 579){ 
   Red = (Wavelength - 510d) / (580d - 510d);
   Green = 1.0;
   Blue = 0.0;
  }else if(Wavelength >= 580 && Wavelength <= 644){
   Red = 1.0;
   Green = -(Wavelength - 645d) / (645d - 580d);
   Blue = 0.0;
  }else if(Wavelength >= 645 && Wavelength <= 780){
   Red = 1.0;
   Green = 0.0;
   Blue = 0.0;
  }else{
   Red = 0.0;
   Green = 0.0;
   Blue = 0.0;
  }
  if(Wavelength >= 350 && Wavelength <= 419){
   Factor = 0.3 + 0.7*(Wavelength - 350d) / (420d - 350d);
  }else if(Wavelength >= 420 && Wavelength <= 700){
	 Factor = 1.0;
  }else if(Wavelength >= 701 && Wavelength <= 780){
   Factor = 0.3 + 0.7*(780d - Wavelength) / (780d - 700d);
  }else{
   Factor = 0.0;
 }

  int R = this.factorAdjust(Red, Factor, IntensityMax, Gamma);
  int G = this.factorAdjust(Green, Factor, IntensityMax, Gamma);
  int B = this.factorAdjust(Blue, Factor, IntensityMax, Gamma);

  return Color.FromArgb(R, G, B);
}

- Alessandro
 
Status
Not open for further replies.


Back
Top