Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to show the plot of a function
How to show the plot of a function [message #3727] Sat, 17 June 2006 19:15 Go to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I would like to turn on some pixels of the screen and plot the graphics of a mathematical function. I did it in the past with others OS in C. I remind I needed only to enter in the hiresolution graphics and the elementary function Plot(x,y) to hilight just one pixel at once. Then I should build the rest (axis, label, geometrical transformation). Now I would like to do the same but without loose too much time.
I've investigated the upp example and I am a bit confused about what to use (agg, upp, opengl). Please let me ask you some question:

1) I am running 606dev2. Is it include the new upp graphical routine?

2) which is the best widget where can I draw?

3) I need a transformation from real world coordinate to screen coordinate. Do you think make sense to use opengl? Perhaps I should pay attention to agg given its nice antialiasing capability. Any suggestion? (Please keep in mind that at some moment I would like to convert the application to display even complex functions... I mean those having a real and imaginary part... perhaps to generate a fractal.

Luigi

[Updated on: Sat, 17 June 2006 19:16]

Report message to a moderator

Re: How to show the plot of a function [message #3735 is a reply to message #3727] Sun, 18 June 2006 14:33 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Contributor
Administrator
Luigi, if you have noticed, ChartCtrl is a section on our forums where nobody wants to post...
Plotting is one of the reasons I'm investing my time in agg. Btw, it has coord transformer:
from agg

AGG just provides you a transformer of that kind, namely, that can convert your own view port to the device one. And it's your responsibility to include it into the proper place of the pipeline. You can also write your own very simple class that will allow you to operate with millimeters, inches, or any other physical units.


My agg story began also with the question:
forlano wrote


2) which is the best widget where can I draw [plot functions]?


I found that I can easily draw curves ( using upp Paint(Draw& w) ) on most upp widgets (maybe all?) but the problems arrive when I want to resize and print. So, I guessed, Drawing and Report are the most likely candidates. But...what I if want interactive curves and interactive reports? So , I investigated upp VectorDesigner... and discovered its limitations.

But the biggest limitation for function curves is, IMO, pixel accuracy and/or anti-aliasing. And I couldn't find what could compete with agg possibilities.
(And I don't like openGL for its text problems).
If you decide to use agg, you can expect some advice from me...
(At the moment I'm trying to solve that agg optimized printing)
Aris
Re: How to show the plot of a function [message #3736 is a reply to message #3735] Sun, 18 June 2006 15:29 Go to previous message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
Quote:


Luigi, if you have noticed, ChartCtrl is a section on our forums where nobody wants to post...


Just now I noted it Smile
fudadmin wrote on Sun, 18 June 2006 14:33


If you decide to use agg, you can expect some advice from me...
(At the moment I'm trying to solve that agg optimized printing)
Aris



I've decided to use AGG. The image transformation I've seen in action and the line accuracy were enough for me. For my purpose it is very important what can I see on the screen.
I'll just start to study your experiment http://www.arilect.com/upp/forum/index.php?t=msg&th=1088 &start=0& .

Luigi

[Updated on: Sun, 18 June 2006 15:32]

Report message to a moderator

Previous Topic: How to use RLE compression to print a series bmp images?
Next Topic: how to #define/#include correctly the .iml file
Goto Forum:
  


Current Time: Sun Nov 17 01:28:54 CET 2019

Total time taken to generate the page: 0.01823 seconds