On Fri, May 05, 2023 at 07:21:13PM +0000, '68th' via FriCAS - computer algebra
system wrote:
> ------- Original Message -------
> On Thursday, May 4th, 2023 at 9:30 PM, Waldek Hebisch
> [email protected] wrote:
>
>
> judging from what you said, this command:
>
> > draw(first(pointLists(makeObject(1, t=0..2*%pi, coordinates==polar))))
>
> as well as this one:
>
> > draw(1, t=0..2*%pi, coordinates==polar)
>
> don't do the transformation you are talking about and yet produce
> same correct plots in polar coordinates.
Correct depends on what user want. In first command above
'makeObject' is doing transformation from polar to cartesion coordinates.
In the second the same thing is done by 'draw' (in fact, draw calls
'makeObject').
> a user gives a function in polar coordinates and gets a plot in
> polar coordinates. why would he want a polar graph for a Cartesian function?
Our terminalogies differ: I would say that plot is in cartesion
coordinates. Concerning usefulness, usually coordinates are used
to get simpler view. For example, drawing circle in polar coordinates
(that is drawing points with polar coordinates of point on the
circle) gives an interval, which is much simpler than circle.
If graph of a function is subset of circle, that drawing it in
polar coordinates would make it simpler. Besides graphs of
functions, FriCAS can draw curves. If you take Keplerian
orbit of a planet, than looking at polar coordinates of points
gives particularly simple view.
More generally, FriCAS covers _huge_ part of mathematics. To
understand and use it we need consistent terminology that
span many math domains. Unfortunately in many field people
make conventions that are "locally" useful, but in many
cases contradict what is done/useful in different domains.
Fortunately, FriCAS documatation say "transformation" and
spells out details.
> as far as i understand, the problem is not in transforming a graph,
> but in making the program treat some implicit functions in non-Cartesian
> coordinates properly. correct me if i'm wrong, pointLists always returns
> points in Cartesian coordinates,
Well, pointLists ultimately consists of Points, that is element of
FriCAS type Point. Point is representd using coordinates which
one could call cartesian, but I am affraid that this is different
meaning of cartesian that you use.
In normal operation transformations are applied before you could
access point list, and functions that draw point lists do not
perform nontrivial transformations (graphic windows have options
for scaling and rotations and this is done on point lists).
However, as I showed, user can apply transformation to point
list.
> so real transformation [polar(pt), elliptic(a), etc] should occur either in
> pointLists itself or in makeObject. probably, in the former.
Core part of drawing is producing point lists, this is done in
functions called form 'makeObject'. 'pointLists' merely accesses
already created point lists. Note that FriCAS uses overloading
and there are several 'makeObject' functions organized into
layers. Upper layer merely converts arguments and delegates
real work to lower layer.
Coming back to curves given by equations: one needs to inserts
transformation in correct place. Finding correct place
probably is not very difficult, but is not entirely obvious
either. As I wrote, drawing code tries to ensure that point
lists are good approximation to the curve. That involves
some arithmetic which in case of curves given by equations
it mixed with equation solving.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/20230507013524.u7ppedsgthe57coj%40fricas.math.uni.wroc.pl.