BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RFBS: The View of a Factory Floor, so to speak

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Clay Shannon
Guest





PostPosted: Wed Oct 18, 2006 3:51 am    Post subject: RFBS: The View of a Factory Floor, so to speak Reply with quote



(Request for Brain Storming, not Bovine Slop)

Something I will need to do eventually is display a real-time graphical
representation of what the machines on the factory floor are doing (with
"red lights" and "green lights" etc. indicating what is going on at various
places at any given time).


A Quick&Dirty implementation of this would be to cover the form with a
TImage (.jpg or .bmp), and then plop an array of TShapes in strategic places
and change their colors (from clGrey to clLime, or clLime to clRed, etc.) as
various states change.


Does anybody have a better/slicker idea?


BTW, I'm using Delphi 2006 for this.

--
Download my historical nonfiction and/or satirical (etc.) fiction books free
from here:
http://www.lulu.com/blackbirdcraven
Back to top
somebody
Guest





PostPosted: Wed Oct 18, 2006 5:02 am    Post subject: Re: The View of a Factory Floor, so to speak Reply with quote



"Clay Shannon" <blacky (AT) redgreen (DOT) com> wrote

Quote:
Does anybody have a better/slicker idea?

Better? Don't think so. Slicker? Yes. Create a 3D (OpenGL/Direct3D) app
complete with models and actors.
Back to top
Nils Haeck
Guest





PostPosted: Wed Oct 18, 2006 8:11 am    Post subject: Re: The View of a Factory Floor, so to speak Reply with quote



http://web.telia.com/~u16122952/water/sub10.jpg

Hmm nice:)

How did you do the water? Esp the refletions of the fire are interesting.

Nils
Back to top
Anders Isaksson
Guest





PostPosted: Wed Oct 18, 2006 8:11 am    Post subject: Re: The View of a Factory Floor, so to speak Reply with quote

Clay Shannon wrote:
Quote:

A Quick&Dirty implementation of this would be to cover the form with a
TImage (.jpg or .bmp), and then plop an array of TShapes in strategic
places and change their colors (from clGrey to clLime, or clLime to
clRed, etc.) as various states change.

What would be on the image, a map? Will you ever need to zoom in/out? Pan?

I would skip the TImgage/TShape thing, and draw directly on a TPaintBox
instead, drawing the image first and then all indicators on top of that
(TPaintox on a TPanel, Panel.DoubleBuffered := True, code in PaintBox.Paint
(or whatever it's called)).

As for the indicators, I would make a class for them

TIndicator= class()
X,Y: integer; // Position on unscaled map
State: TState; // Whatever...
procedure Draw(Canvas: TCanvas); // Might need additional parameters
for scaling/panning
...
end;

and keep them all in a collection, which in itself may do some coordinate
transformation calculations and call .Draw() on each indicator.

Depending on how you get the values for the indicators, it might be possible
to put all the definitions for them in a textfile, outside of the program,
making it easier to move them about on the screen when the shop floor is
rebuilt.

--
Anders Isaksson, Sweden
BlockCAD: http://web.telia.com/~u16122508/proglego.htm
Gallery: http://web.telia.com/~u16122508/gallery/index.htm
Back to top
Nils Haeck
Guest





PostPosted: Wed Oct 18, 2006 8:11 am    Post subject: Re: The View of a Factory Floor, so to speak Reply with quote

2D or 3D?

For 3D.. OpenGL, probably easiest with GlScene.

For 2D, have a look at SVG..

If you want to render it, then have a look at my Pyro library :)

It would be as simple as setting the color property for the lights. But you
could also do more sophisticated things like rotating arms, "cars" moving
around etc., by changing transformations. Basically you describe your whole
factory model as a hierarchical model of parametrizable shapes.

Btw this is called process visualisation or SCADA.

Nils
www.simdesign.nl

"Clay Shannon" <blacky (AT) redgreen (DOT) com> schreef in bericht
news:45355e64 (AT) newsgroups (DOT) borland.com...
Quote:
(Request for Brain Storming, not Bovine Slop)

Something I will need to do eventually is display a real-time graphical
representation of what the machines on the factory floor are doing (with
"red lights" and "green lights" etc. indicating what is going on at
various places at any given time).


A Quick&Dirty implementation of this would be to cover the form with a
TImage (.jpg or .bmp), and then plop an array of TShapes in strategic
places and change their colors (from clGrey to clLime, or clLime to clRed,
etc.) as various states change.


Does anybody have a better/slicker idea?


BTW, I'm using Delphi 2006 for this.

--
Download my historical nonfiction and/or satirical (etc.) fiction books
free from here:
http://www.lulu.com/blackbirdcraven
Back to top
Anders Isaksson
Guest





PostPosted: Wed Oct 18, 2006 3:30 pm    Post subject: Re: The View of a Factory Floor, so to speak Reply with quote

Nils Haeck wrote:
Quote:
http://web.telia.com/~u16122952/water/sub10.jpg

How did you do the water? Esp the refletions of the fire are
interesting.


Oh, *that* old picture... :-)

Well, *I* didn't do so much as POVRay (www.povray.org) did :-)

The water is 'just' a transparent, reflective, height field object
(generated from the example in the POVRay docs) on top of a 'roughened
plane'. If you look behind the tanker, you see the line where the heigh
field ends, and the ocean becomes calmer. It took 'some' fiddling with the
parameters before I was satisfied. That was in the old, trusty version 3.0
of POVRay, I think they have changed a lot in later versions, so at least
the fire and smoke will not work anymore (I really have to read up on
'media' in POVRay).

I don't have time nowadays for doing renderings, but I sure would like to
sit down again and create things. I'm most proud of this one (also a pure
render, no post-processing),
http://www.brickshelf.com/gallery/anders-isak/IdeaBookInspiration/playtable002.jpg
even though it hasn't scored in any of the competitions where it has
entered.

--
Anders Isaksson, Sweden
BlockCAD: http://web.telia.com/~u16122508/proglego.htm
Gallery: http://web.telia.com/~u16122508/gallery/index.htm
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.