{ Taala-JSP-koodi JSX-käännöstä varten 29.11.2019 } { Muista täpättää LaTeX texts: } { Yhtälöryhmä ja suorat tasossa } { Gauss-Jordan -prosessi } { JSX boardname: GaussJordan2D } { JSX element id: gaussjordan2d } #CODEBASE = "jsp" #ARCHIVE = "jsp4.jar" #WIDTH = 400 #HEIGHT = 500 #ALIGN = "center" *Frame = 1 *TextFont = "Helvetica" *TextBold = 0 *TextSize = 12 *LabelFont = "Helvetica" *LabelBold = 0 *LabelSize = 12 *MeasureFont = "Helvetica" *MeasureSize = 12 *MeasureBold = 0 *MeasureInDegrees = 1 *DirectedAngles = 0 *BackBlue = 255 *BackGreen = 230 *BackRed = 255 $xText FixedText(385,325,'x')[bold, black, justifyCenter]; {,labelAlign(0,0)} $yText FixedText(195, 170,'y')[bold, black, justifyCenter]; {,labelAlign(-2,7)} $title1 FixedText(5,15,'YHTÃLÖRYHMÄT')[plain,font('Helvetica'),size(18),bold,black,justifyLeft]; $title2 FixedText(165,15,'OPERAATIOT')[plain,font('Helvetica'),size(18),bold,black,justifyLeft]; { The Plane Coordinate System } $O FixedPoint(200, 330) [black, label('0')]; {,labelAlign(5,10)} $unitp UnitPoint($O, 25) [white, label('1'),hidden]; $coord Origin&Unit($O, $unitp)[black, hidden]; $Xax AxisX($coord)[black]; $Yax AxisY($coord)[black,hidden]; $start FixedPoint(200,500)[hidden]; $end FixedPoint(200,160)[hidden]; $Yaxh Segment($start,$end)[black]; {,arrowL} $LUppP FixedPoint(0,500)[hidden]; $LLowP FixedPoint(0,160)[hidden]; $RLowP FixedPoint(400,160)[hidden]; $RUppP FixedPoint(400,500)[hidden]; $RectAP Polygon($LUppP,$LLowP,$RLowP,$RUppP,$LUppP)[color(240,220,230),layer(50)]; $LUppR1 FixedPoint(0,53)[hidden]; $LLowR1 FixedPoint(0,68)[hidden]; $RLowR1 FixedPoint(400,68)[hidden]; $RUppR1 FixedPoint(400,53)[hidden]; $RectAR1 Polygon($LUppR1,$LLowR1,$RLowR1,$RUppR1,$LUppR1)[yellow,layer(50)]; $LUppR2 FixedPoint(0,103)[hidden]; $LLowR2 FixedPoint(0,118)[hidden]; $RLowR2 FixedPoint(400,118)[hidden]; $RUppR2 FixedPoint(400,103)[hidden]; $RectAR2 Polygon($LUppR2,$LLowR2,$RLowR2,$RUppR2,$LUppR2)[yellow,layer(50)]; $RO FixedPoint(200,500) [black, label('0'),hidden]; $Ref Translation($RO,25,0) [hidden]; $Ray Ray($Ref,$RO) [black, hidden]; $Rykk Point on object($Ray,1)[yellow, label('1'),hidden]; $RL Line($Rykk,$RO)[black, layer(5),hidden]; $Rpta Point on object($RL, 2)[red, label('a'),layer(3),hidden]; $Rptb Point on object($RL, 4)[red, label('b'),layer(3),hidden]; $Rptc Point on object($RL,-2)[red, label('c'),layer(3),hidden]; $Rptd Point on object($RL, 3)[blue, label('d'),layer(3),hidden]; $Rpte Point on object($RL, 5)[blue, label('e'),layer(3),hidden]; $Rptf Point on object($RL,-1)[blue, label('f'),layer(3),hidden]; { The background } $LUppS FixedPoint(0,160)[hidden]; $LLowS FixedPoint(0,0)[hidden]; $RLowS FixedPoint(400,0)[hidden]; $RUppS FixedPoint(400,160)[hidden]; $RectAS Polygon($LUppS,$LLowS,$RLowS,$RUppS,$LUppS)[color(255,255,255),layer(10)]; $Ra Ratio/Points($RO,$Rykk,$Rpta, 5,30, '')[red, suffix(' x')]; $Rb Ratio/Points($RO,$Rykk,$Rptb, 50,30, '+ (')[red,suffix(') y = ')]; $Rc Ratio/Points($RO,$Rykk,$Rptc, 125,30, '')[red]; $Rd Ratio/Points($RO,$Rykk,$Rptd, 5,45, '')[blue, suffix(' x')]; $Re Ratio/Points($RO,$Rykk,$Rpte, 50,45, '+ (')[blue,suffix(') y = ')]; $Rf Ratio/Points($RO,$Rykk,$Rptf, 125,45, '')[blue]; $R1 FixedText(188,32,'R1')[red]; {,text('RSUB{1}')} $R2 FixedText(188,47,'R2')[blue]; {,text('RSUB{2}')} { The First Operation Real Line GAUSS } $IText FixedText(385,95,'I')[bold, black, justifyCenter]; $RO1 FixedPoint(200,70) [black, label('0')]; $Ref1 Translation($RO1,50,0) [hidden]; $Ray1 Ray($Ref1,$RO1) [black, hidden]; $Rykk1 Point on object($Ray1,1)[yellow, label('1'),hidden]; $RL1 Line($Rykk1,$RO1)[black, layer(5)]; $RptA1 Point on object($RL1, 3)[red, label('A1'),layer(5)]; {,highlight,label(' \\( ASUB{1} \\) ')} $RptA2 Point on object($RL1, 1)[blue,label('A2'),layer(5)]; {,highlight,label(' \\( ASUB{2} \\) ')} { Correct positions of A1 and A2 } $RptA1_corr Point on object($RL1, 0.5)[white,hidden]; $RptA2_corr Point on object($RL1, 1.5)[white,hidden]; { Animations of A1 and A2 with Move } $MB_A1 MoveButton(5,160, 2.5, 'A1')($RptA1_corr, $RptA1); {,text('Siirrä \\( A_1 \\)')} $MB_A2 MoveButton(5, 185, 2.5, 'A2')($RptA2_corr, $RptA2); {,text('Siirrä \\( A_2 \\)')} $R1pr FixedText(220, 80,'R1'' <-- ')[red]; {,text('RSUB{1}'' \\ \\leftarrow \\ ')} $R2pr FixedText(247,95,'R2'' <-- R2 - ')[blue ]; {,text('RSUB{2}'' \\ \\leftarrow \\ RSUB{2} \\ -')} $RA1 Ratio/Points($RO1,$Rykk1,$RptA1, 210,81, '(')[red,suffix(')')]; $R1suff FixedText(275, 82,'R1')[red]; {,text('RSUB{1}')} $RA2 Ratio/Points($RO1,$Rykk1,$RptA2, 250,95, '(')[blue,suffix(')')]; $R2suff FixedText(315, 97,'R1')[blue]; {,text('RSUB{1}')} $Rapr Calculate( 5, 80,'', 'AB*')($Ra,$RA1)[red,suffix(' x')]; $Rbpr Calculate( 50, 80,'+ (','AB*')($Rb,$RA1)[red,suffix(') y = ')]; $Rcpr Calculate(125, 80,'', 'AB*')($Rc,$RA1)[red]; $Rdpr Calculate( 5,95,'', 'ABC*-')($Rd,$RA2,$Ra)[blue,suffix(' x')]; $Repr Calculate( 50,95,'+ (','ABC*-')($Re,$RA2,$Rb)[blue,suffix(') y = ')]; $Rfpr Calculate(125,95,'', 'ABC*-')($Rf,$RA2,$Rc)[blue]; { The Second Operation Real Line JORDAN } $IIText FixedText(383,150,'II')[bold, black, justifyCenter]; $RO2 FixedPoint(200,120) [black, label('0')]; $Ref2 Translation($RO2,50,0) [hidden]; $Ray2 Ray($Ref2,$RO2) [black, hidden]; $Rykk2 Point on object($Ray2,1)[yellow, label('1'),hidden]; $RL2 Line($Rykk2,$RO2)[black, layer(5)]; $RptB1 Point on object($RL2, 0)[red, label('B1'),layer(5)]; {,highlight,label(' \\( B SUB{1} \\) '),labelAlign(0,8)} $RptB2 Point on object($RL2, 1)[blue,label('B2'),layer(5)]; {,highlight,label(' \\( B SUB{2} \\) '),labelAlign(0,8)} { Correct positions of B1 and B2 } $RptB1_corr Point on object($RL2, -2)[white,hidden]; $RptB2_corr Point on object($RL2, -1)[white,hidden]; { Animations of B1 and B2 with Move } $MB_B1 MoveButton(5,215, 2.5, 'B1')($RptB1_corr, $RptB1); {,text('Siirrä \\( B_1 \\)')} $MB_B2 MoveButton(5, 240, 2.5, 'B2')($RptB2_corr, $RptB2); {,text('Siirrä \\( B_2 \\)')} $R1prpr FixedText(255,135,'R1'' <-- R1' - ')[red]; {,text('R SUB{1}'' '' \\ \\leftarrow \\ R SUB{1}'' \\ -')} $R2prpr FixedText(223, 150,'R2'' <-- ')[blue]; {,text('R SUB{2}'' '' \\ \\leftarrow \\ ')} $RB1 Ratio/Points($RO2,$Rykk2,$RptB1, 255,135, '(')[red,suffix(')')]; $R2prsuff FixedText(320, 135,'R2')[red]; {,text('R SUB{2}'' ')} $RB2 Ratio/Points($RO2,$Rykk2,$RptB2, 210,150, '(')[blue,suffix(')') ]; $R1prsuff FixedText(275, 150,'R2')[blue]; {,text('R SUB{2}'' ')} $Raprpr Calculate( 5,135,'', 'ABC*-')($Rapr,$RB1,$Rdpr)[red,suffix(' x')]; $Rbprpr Calculate( 50,135,'+ (','ABC*-')($Rbpr,$RB1,$Repr)[red,suffix(') y = ')]; $Rcprpr Calculate(125,135,'', 'ABC*-')($Rcpr,$RB1,$Rfpr)[red]; $Rdprpr Calculate( 5,150,'', 'AB*')($Rdpr,$RB2)[blue,suffix(' x')]; $Reprpr Calculate( 50,150,'+ (','AB*')($Repr,$RB2)[blue,suffix(') y = ')]; $Rfprpr Calculate(125,150,'', 'AB*')($Rfpr,$RB2)[blue]; $alfa Calculate(300,280,'alfa =','0 AB/ @atan')($Rbprpr,$Raprpr)[black,hidden]; $beta Calculate(300,300,'beta =','0 AB/ - @atan')($Rdprpr,$Reprpr)[black,hidden]; $UC Circle($O,$unitp)[black,hidden]; $yykk Intersect2($Yax,$UC)[white,label('1'),hidden]; $Palfa Rotation/MeasuredAngle($yykk,$O,$alfa)[black,hidden]; $Pbeta Rotation/MeasuredAngle($unitp,$O,$beta)[black,hidden]; $Lalfa Line($Palfa,$O)[red,hidden]; $Lbeta Line($Pbeta,$O)[blue,hidden]; $det Calculate(300,280,'','AB*CD*-')($Ra,$Re,$Rb,$Rd)[hidden]; $xo Calculate(300,280,'','AB*CD*-')($Rc,$Re,$Rb,$Rf)[hidden]; $yo Calculate(300,280,'','AB*CD*-')($Ra,$Rf,$Rd,$Rc)[hidden]; $x Calculate(300,280,'','AB/')($xo,$det)[hidden]; $y Calculate(300,280,'','AB/')($yo,$det)[hidden]; $xy PlotXY($y,$coord,$x)[black]; $LA VectorTranslation($Lalfa,$O,$xy)[red,hidden]; $LB VectorTranslation($Lbeta,$O,$xy)[blue,hidden]; $YV FixedPoint(0,160)[hidden]; $YO FixedPoint(400,160)[hidden]; $AV FixedPoint(0,500)[hidden]; $AO FixedPoint(400,500)[hidden]; $LYVYO Segment($YV,$YO)[black]; $LAVAO Segment($AV,$AO)[black]; $LYVAV Segment($YV,$AV)[black]; $LYOAO Segment($YO,$AO)[black]; $IYLA Intersect($LYVYO,$LA)[hidden]; $IALA Intersect($LAVAO,$LA)[hidden]; $IVLA Intersect($LYVAV,$LA)[hidden]; $IOLA Intersect($LYOAO,$LA)[hidden]; $SalfaYA Segment($IYLA,$IALA)[red]; $SalfaYV Segment($IYLA,$IVLA)[red, hidden]; $SalfaYO Segment($IYLA,$IOLA)[red, hidden]; $SalfaVA Segment($IALA,$IVLA)[red, hidden]; $SalfaVO Segment($IOLA,$IVLA)[red, hidden]; $SalfaAO Segment($IALA,$IOLA)[red, hidden]; $IYLB Intersect($LYVYO,$LB)[hidden]; $IALB Intersect($LAVAO,$LB)[hidden]; $IVLB Intersect($LYVAV,$LB)[hidden]; $IOLB Intersect($LYOAO,$LB)[hidden]; $SbetaYA Segment($IYLB,$IALB)[blue]; $SbetaYV Segment($IYLB,$IVLB)[blue, hidden]; $SbetaYO Segment($IYLB,$IOLB)[blue]; $SbetaVA Segment($IALB,$IVLB)[blue, hidden]; $SbetaVO Segment($IOLB,$IVLB)[blue, hidden]; $SbetaAO Segment($IALB,$IOLB)[blue, hidden];