Searching \ for '[PIC]: LCD Graphics Routines' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/lcd/pic.htm?key=lcd
Search entire site for: 'LCD Graphics Routines'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: LCD Graphics Routines'
2000\06\07@065317 by Peter Betts

picon face
Having looked at Steve Lawther's web page on the T6963 LCD controller PIC
code I wondered if there was a web link anyone can give me that explains how
to generate graphics procedures. (Thanks to Steve, I'm about to try it out
on a 240*64 pixel Varitronix display)

Things like drawing circles, rotating line vectors say for creating a
virtual speedometer or rev counter?

With all the games code out there I'm sure there must be a concise web
location with mathematical methods/routines for doing quite complex graphic
front ends.

Oh... I realise Steve had some graphics routines in his PIC code but I'm
after maybe a more generic source of material explaining the most efficient
way to produce various graphical shapes and or vector/dot drawings

Anyone help?

Pete

2000\06\07@071019 by John Perkinton

flavicon
face
part 0 1002 bytes
-----Original Message-----
From: Peter Betts [spam_OUTpeter.bettsTakeThisOuTspamNOKIA.COM]
Sent: 07 June 2000 10:49
To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
Subject: [PIC]: LCD Graphics Routines


Having looked at Steve Lawther's web page on the T6963 LCD controller PIC
code I wondered if there was a web link anyone can give me that explains how
to generate graphics procedures. (Thanks to Steve, I'm about to try it out
on a 240*64 pixel Varitronix display)

Things like drawing circles, rotating line vectors say for creating a
virtual speedometer or rev counter?

With all the games code out there I'm sure there must be a concise web
location with mathematical methods/routines for doing quite complex graphic
front ends.

Oh... I realise Steve had some graphics routines in his PIC code but I'm
after maybe a more generic source of material explaining the most efficient
way to produce various graphical shapes and or vector/dot drawings

Anyone help?

Pete


Attachment converted: creation:t6963.zip (pZIP/pZIP) (0001626C)

2000\06\07@091914 by Octavio Nogueira

flavicon
face
I'm trying to do the same thing, but in C.
Currently I have just a line routine and it's
not finished yet. Please let me know is you
find anything.
Are you using the fuel injection pulse to measure
RPM and fuel?

Friendly Regards

Octavio Nogueira
===================================================
nogueiraspamKILLspampropic2.com                  ICQ# 19841898
ProPic tools - low cost PIC programmer and emulator
http://www.propic2.com
===================================================

{Original Message removed}

2000\06\07@094619 by Peter Betts

picon face
> Please let me know is you find anything.
I've searched the web but can't find a concise list of equations or methods
of 2D or even 3D drawings. Everything I find seems to relate to some form of
software CAD package which is no good.


> Are you using the fuel injection pulse to measure
> RPM and fuel?

Yes. I want to measure the duty cycle of the injector pulse and display this
as either a bar (like a VU meter) or a rotating dial like a rev counter.
Oh and also have the same for a rev counter.

I could go back to basics and translate the duty cycle into a rotation angle
and do some trigonometry but I don't want to do it the long winded way if
there are easier ways of doing this kind of thing.

Pete

2000\06\07@110726 by Sergio Masci

flavicon
picon face
{Quote hidden}

The simplest way to do this (also turns out to be the most efficent in
terms of processing power) is to have a list of all the points on your
gage that will be effected by whatever it is you are trying to messure.
Say you have a range between 0 and 99, divide your list into 100
sections. Section 0 contains all the points that will be in the on state
at value 0, section 1 contains all the points that will be in the on
state at value 0 and 1, section 2 contains all the points that will be
in th on state at value 0 and 1 and 2. Now when your value moves from 0
to 5 you set all the pixels on that belong to section 5 when the value
moves down (from 5) to 3 you set all the pixels off that belong to
sections 5 and not section 3. when the value again goes up to 6 (from 3)
you set all the pixels on that belong to section 6 and not section 3.

If the range is 0 to 99 but the steps between each division are too big,
multiply the range so that the steps become smaller (keep 100 divisions
just increase the resolution).

If the list of pixels is kept ordered (section 0, section 1, section 2
etc) then you can superimpose each section onto a common list and have
pointers to the sections in the common list. With a little creative
pointer aritmetic you end up with a list of points that must be turned
on or off and an incredibly tight and efficient loop.

This method allows you to have both a needle and flood fill gage with
superimposed divisions, numbers etc.

e.g.


                  |   |   <- section 4   --|       GOING UP
                  |   |                    |
                  |   |                    |-- All pixels that must
              |       |   <- section 3     |   be turned on when value
              |       |                    |   moves from 2 to 4
              |       |                    |
          |           |   <- section 2   --|
          |           |
          |           |
      |               |   <- section 1
      |               |
      |               |
  |                   |   <- section 0


                      ^
                      |
                      common list of pixels





                  |   |   <- section 4   --|       GOING DOWN
                  |   |                    |
                  |   |                    |-- All pixels that must
              |       |   <- section 3   --|   be turned off when value
              |       |                        moves from 4 to 3
              |       |
          |           |   <- section 2
          |           |
          |           |
      |               |   <- section 1
      |               |
      |               |
  |                   |   <- section 0


                      ^
                      |
                      common list of pixels


This isn't taken from a game but a commercial product called XEBOT.
This is the internal mechanism it uses to update user defined gages.
The user describes a gage using two curves and XEBOT does the rest.
Sorry XEBOT wont run on a PIC.

Sergio Masci
Sentient Real Time Systems Ltd
http://www.xcprod.com/titan

2000\06\15@070707 by Octavio P Nogueira

flavicon
face
Are you still interested in this graphic routines?
I developed them in C. They are line, circle, barograph
and gauge. The latest is what you want, it accepts the
x and y origins, length and angle from 0 to 360.

Friendly Regards

Octavio Nogueira
===================================================
.....nogueiraKILLspamspam.....propic2.com                  ICQ# 19841898
ProPic tools - low cost PIC programmer and emulator
http://www.propic2.com
===================================================

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...