Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
TAChart
(Moderator:
Ask
) »
[SOLVED] Graphing the equation for angle of trajectory using TCHART
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Compiler Error and No Ide...
by
bytebites
[
Today
at 08:19:28 am]
How to share an .apk with...
by
rsu333
[
Today
at 07:42:36 am]
Virtual treeview and back...
by
piola
[
Today
at 06:44:32 am]
questions concerning proc...
by
anonymousstranger
[
Today
at 05:09:13 am]
How do I get the name of ...
by
anonymousstranger
[
Today
at 05:08:07 am]
Installation problems on ...
by
TristamShandy
[
Today
at 04:19:20 am]
Question about $include
by
ydd
[
Today
at 04:16:25 am]
64 bit/32 bit problem
by
jamie
[
Today
at 03:37:35 am]
Using GTK3 on Lazarus
by
dbannon
[
Today
at 03:31:47 am]
"Charles Petzold" Style P...
by
WayneSherman
[
Today
at 03:00:35 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Graphing the equation for angle of trajectory using TCHART (Read 2842 times)
sunbreezy393
New Member
Posts: 11
[SOLVED] Graphing the equation for angle of trajectory using TCHART
«
on:
December 30, 2015, 07:06:20 pm »
I am new to using Pascal/T Charts and was wandering how you would graph the equation for the angle of trajectory?
«
Last Edit: January 02, 2016, 12:54:38 am by sunbreezy393
»
Logged
wp
Hero Member
Posts: 7923
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #1 on:
December 30, 2015, 07:13:06 pm »
http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Function_Series
is a tutorial with step-by-step instructions on how to plot functions with TAChart.
Logged
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...
sunbreezy393
New Member
Posts: 11
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #2 on:
December 30, 2015, 07:18:04 pm »
Thanks for your help, but I have looked at this and it seems to work if z and v are constants but not when they are variables.
Logged
wp
Hero Member
Posts: 7923
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #3 on:
December 30, 2015, 07:28:23 pm »
So, you have a function of 2 variables, z = f(x,y)? You can use a TColorMapSeries where one variable runs along the x and the other variable along the y axis, and z is encoded as color shades. Have a look at
http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming
.
But maybe I do not understand your question correctly. Can you post a link or a sketch from which I could guess what the chart is supposed to look like?
Logged
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...
sunbreezy393
New Member
Posts: 11
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #4 on:
December 30, 2015, 09:11:12 pm »
Here is an image of what the graph looks like
Logged
wp
Hero Member
Posts: 7923
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #5 on:
December 30, 2015, 11:08:19 pm »
Not straightforward, probably too much for a beginner...
Paint the parabola by using the TFunctionSeries mentioned above, or a standard TLineSeries
Then add an event handler to the OnAfterDraw event of the chart. Here you select the points of further analysis where you calculate the tangent vector, decompose it into its x and y components and paint the corresponding lines and arrows. Find information on the OAfterDraw painting in
http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Background_design
.
Since this project looks like some homework assignment I do not want to give more details, sorry.
Logged
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...
jmpessoa
Hero Member
Posts: 1727
Re: Graphing the equation for angle of trajectory using TCHART
«
Reply #6 on:
December 31, 2015, 01:20:47 am »
Hello sunbreezy393!
maybe this component [and demos ]can help you:
https://github.com/jmpessoa/tfpmathexpressionbridge
Logged
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard
sunbreezy393
New Member
Posts: 11
Re: [SOLVED] Graphing the equation for angle of trajectory using TCHART
«
Reply #7 on:
January 02, 2016, 12:51:58 am »
Thank you very much for all your help, I have fixed the problem now.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
TAChart
(Moderator:
Ask
) »
[SOLVED] Graphing the equation for angle of trajectory using TCHART
TinyPortal
© 2005-2018