Canvas sandbox: Difference between revisions

Jump to navigation Jump to search
m
Line 342: Line 342:
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
</syntaxhighlight>
</syntaxhighlight>
== 2D Plotting ==
{{FGCquote
|1= Trivial graphs can certainly be plotted using Nasal/Canvas (as per the screen shots/examples discussed above), but anything more complex (think multiple 2d/3d graphs) are unlikely to benefit from the explicit nature of using Canvas (OpenVG) for plotting purposes, keep in mind all the property I/O and setup overhead for otherwise identical graphs.
So anybody really wanting to do 2D/3D plotting (analogous to gnuplot), inside the fgfs main process, would be well-advised to use an existing library like MathGL (GPL, multi-platform), or GNU Octave, and expose this to Canvas as a custom element, specifically dedicated to 2d/3d plotting - possibly with Nasal/CppBind support:
* [http://mathgl.sourceforge.net/doc_en/Drawing-in-memory.html#Drawing-in-memory MathGL: drawing in memory]
* [http://mathgl.sourceforge.net/doc_en/Data-plotting.html#Data-plotting MathGL: Data plotting]
* [[Canvas Development#Adding a new Element|Canvas: Creating a new Element]]
* [[Nasal/CppBind|CppBind: Exposing libraries to Nasal]]
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=259622#p259622
  | title  = <nowiki>Re: Simgear-based subsystem with Canvas support?</nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Oct 4th, 2015
  | added  = Oct 4th, 2015
  | script_version = 0.23
  }}
}}


<references/>
<references/>

Navigation menu