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.

Trevor

0
Joined
Jul 17, 2009
Messages
4,386
Points
113
So I haven't written any PHP in a while, and since swatmugga posted one, I figured I'd take a stab at it too.

This is what the better part of my day yielded:

Laser Warning Label Generator

For whatever wavelength in the visible spectrum you choose, it colors the beam on the label that color. Anything outside it shows up black. It just now occurred to me that could be annoying if you just want a standard red beam, so I'll code an override option and build a better GUI tomorrow.

Instead of using a pre-built image and printing text, I re-rendered the whole thing using PHP's GD library to completely avoid quality issues.

Hope some of you find it useful.

Please leave a note here if you want me to add laser classes (all I used was the old system) or system types (I added just a few to test it).

-Trevor
 
Last edited:





Awesome work! The only other thing I can think of, is can you make it selectable for <, = or > then output power?

For example

<50mw
50mw
>50mw
 
Very nice.... I like it...:gj:

Maybe have the Laser Class automatically be chosen by the
Power you choose for the label.. like you do for the color
of the Label's Laser Beam & Spot...:cool:


Jerry
 
Last edited:
Hey I like it! one thing though the text changes depending on the class, see the yellow labels:
Laser safety - Wikipedia, the free encyclopedia

example: class 4 you must avoid direct or indirect exposure.

I'll do that.

Today I cleaned up the GUI and added the automatic class selection option. Also, previous settings no longer clear from the fields on form submission. I'll keep coding tomorrow after my brain cools and coagulates overnight - I melted it by having classes then spending several hours writing C++, then switching to PHP.

-Trevor
 
Hey I like it! one thing though the text changes depending on the class, see the yellow labels:
Laser safety - Wikipedia, the free encyclopedia

example: class 4 you must avoid direct or indirect exposure.

I've gone in and made the promised changes (beam color override, sign selection, and a counter for fun), but I haven't done this yet. I'm using the old system, but the warning phrases on the article are for the new system.

Do you (or anyone else) have suggestions for warning phrases for classes I, II, IIIa, IIIb, and IV?

-Trevor
 
Last edited:
The only other thing is that the class type is not centered as the rest of the text, its right justified.
 
Im not sure waht the standard is really. But it just looked a bit out of place compared to the rest of the text.

Thanks
 
Im not sure waht the standard is really. But it just looked a bit out of place compared to the rest of the text.

Thanks

I centered it... looks odd to me, but that could stem from the fact that I've been working on this thing for a while now and the text has been in the corner the whole time.

EDIT: Added anti-aliasing to the beam and scatter.

-Trevor
 
Very impressed! Great work, I think it's pretty kickass. :D
 
Status
Not open for further replies.


Back
Top