Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (60 sloc) 2.09 KB
/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [ Created with wxMaxima version 14.12.0 ] */
/* [wxMaxima: title start ]
Tangent Lines And Conics
[wxMaxima: title end ] */
/* [wxMaxima: comment start ]
The implicit equations defining the tangent lines and tangent conics for various curves are generated
using Lagrange's approach as per Norman Wildberger's rational differential geometry lectures.
[wxMaxima: comment end ] */
/* [wxMaxima: input start ] */
kill(all)$
load("lm_curves.mac");
arrayinfo(group1);
arrayinfo(group2);
arrayinfo(group3);
arrayinfo(group4);
mycurve: LISSAJOUS $
name: group4[mycurve]@text$
eq: group4[mycurve]@eqn;
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
ex: lhs( eq ) - rhs( eq )$
ex: ratexpand( ex );
/* [wxMaxima: input end ] */
/* [wxMaxima: comment start ]
Expand the terms for the curve at a point [x+r, y+s] relative to [x, y]
[wxMaxima: comment end ] */
/* [wxMaxima: input start ] */
prs:ex, x=x+r, y=y+s $
prse: ratexpand( prs )$
/* [wxMaxima: input end ] */
/* [wxMaxima: comment start ]
Collect terms of the same order using powers of the dummy variable 't'
[wxMaxima: comment end ] */
/* [wxMaxima: input start ] */
prst: ev( prse, x=x*t, y=y*t ) $
deg0: ratcoef( prst, t, 0 ) $
deg1: ratcoef( prst, t, 1 ) $
deg2: ratcoef( prst, t, 2 ) $
/* [wxMaxima: input end ] */
/* [wxMaxima: comment start ]
Now move back to the point [x, y] by subtracting [r, s] and re-evaluating the truncated polynomial.
[wxMaxima: comment end ] */
/* [wxMaxima: input start ] */
pl: deg0 + deg1, x=x-r, y=y-s $
pq: deg0 + deg1 + deg2, x=x-r, y=y-s $
/* [wxMaxima: input end ] */
/* [wxMaxima: comment start ]
T1,2 are the TANGENT LINE and TANGENT CONIC at [r, s]
[wxMaxima: comment end ] */
/* [wxMaxima: input start ] */
p: p=0 $
T1: ratsimp( pl )=0 $
T2: ratsimp( pq )=0 $
print( name, ":", eq ) $
print( "Tangent Line:", T1 ) $
print( "Tangent Conic:", T2 ) $
/* [wxMaxima: input end ] */
/* Maxima can't load/batch files which end with a comment! */
"Created with wxMaxima"$
You can’t perform that action at this time.