[Learn maths from the beginning] the 180th section to solve the triangle

Source: Internet
Author: User
Tags acos asin

plot summary:
[Machine Xiao Wei] in the [engineer Ah Wei] accompanied by the completion of the late Dan cultivation,
The goal of this practice is to [solve triangles].

Drama Start:


Words [Machine Xiao Wei] since entering the Dan period, just a few days, from the beginning of the early cultivation to the late, this
The rapid entry made Xiao Wei frightened. Although this is based on the guidance of the [people to challenge teacher], but this will not
Will go mad, Xiao Wei think it is necessary to [people challenge teacher] there to ask, after all, this cultivation is not a noisy
To play.


This time, [engineer Ah Wei] also and [machine Xiao Wei] together, to see the former teacher, after all, [engineer a
Wei] is also worship in the [People Challenge teacher] under the door.


[People Challenge teacher] to [machine Wei] have this question is not strange, hehe smile, sidewalk: "Xiao Wei Ah, you spirit
The root qualification is extremely outstanding, so I took the highest-class practice in my door, that is, this [nine turn elixir] Dafa teachings
With you. You don't look. You have now entered the late Dan, but in fact still in the nine turn of the first turn. ”


Xiao Wei asked: "Then this turn can be a nominal?" ”


"The man challenged the teacher," replied: "This nature is there, every turn has a name." This first turn is called [the three-bounded five elements 16
You are practicing [heaven and earth Man Formal list], this is three realms, a total of five modules, this is five elements, divided into 16 chapters, that is 10
Six-style. You are now in the three realms of heaven, the two realms have been completed, will enter the human world, just correspond to the end of the late Dan
The world, you understand? ”


At this time [engineer Ah Wei] Plug Introduction Road: "Students in the teacher under the door, not to learn this [three-16 five-line],
But [Tianyuan 19 style], also didn't listen to what the teacher said [nine turn into Dan] Ah. ”


[Person to challenge teacher] way: "That year you qualification although also is superior, but also is only one [Shang] choice, compared to [machine small Wei]
I will not send you such a profound dharma. And all those years passed, and the celestial day changed, I
Also naturally need to advance with the times, the work of the formula will be different naturally. ”


[Machine Xiao Wei] asked: "The student this first turn is about to finish, but do not know this second turn is what?" ”


[People challenged the teacher] replied: "This first turn is equivalent to the stage of learning, and so on, can strategically advantageous position, since
But to travelled to grow. I have five countries in the three territories, and there are several princes in each country, you can
I haven't seen you for one by one. So this second turn, is [travelled worship princes]. “


"Oh, what are the next few turns?" "[Machine Xiao Wei] curiosity big, thought:" This really has nine
Turn nine no, it's a good listen. “


[People challenged the teacher] smiled and replied: "You do not believe that the nine turn all have a name? And you listen well: This third turn, called
[Similarities poke wine line], the fourth turn is called [thousands of troops read and come back], and the "move" to take the ' static ' ascend place]
, the six turn called [through the Wind ' flow ' wave scouring sand], the seventh turn called [' The magic of the Avatar often in], eighth turn called [Ten and six years
Life and Death Book], nineth turn called [Back to Basics Dan Yuanxing], how, you can hear the doorway? ”


[Machine Xiao Wei] said: "Teacher such names, how can students know their meaning." Also hope that the teacher elaborate. ”


[People challenged the teacher] smiled and said: "This matter is not urgent, you know sooner or later, when this xiaoguanzi, in order to increase yaxing. ”


So, [engineer Ah Wei] and [people challenge teacher] and so on three people talk about today's world trend, repair the Fairy Gate sent news current affairs, to
Evening to enjoy the party return.


Star Calendar April 16, 2016 09:31:17, the Milky Way Galaxy Earles the Chinese Empire Jiangnan Line province.
[Engineer Ah Wei] is working with [machine Xiao Wei] to study [triangle].







[Engineer Ah Wei] made a triangular-solution for [Machine Wei]:


<span style= "FONT-SIZE:18PX;" >function Triangle () {this.edges = [];this.angles = [];//known three-side this.know3edges = function (edges) {this.edges = [];this]. Angles = [];this.edges = edges;//angle is radian unit//a edge corresponds to Angle This.angles.push (Math.acos (edges[1]*edges[1) + edges[2]*edges[2]- Edges[0]*edges[0])/(2*edges[1]*edges[2])),//b side corresponding angle This.angles.push (Math.acos (edges[0]*edges[0) + edges[2]*edges [2]-edges[1]*edges[1])/(2*edges[0]*edges[2])),//c side corresponding angle This.angles.push (Math.acos (edges[0]*edges[0) + edges[1]* EDGES[1]-EDGES[2]*EDGES[2])/(2*edges[0]*edges[1])); var x0 = 0, y0 = 0;var x1 = x0 + this.edges[0], y1 = y0;var x2 = x0 + THIS.EDGES[1] * Math.Cos (-this.angles[2]), y2 = y0 + this.edges[1] * Math.sin (-this.angles[2]); var retarray = new Array (); r Etarray.push ([x0, y0]); Retarray.push ([x1, Y1]); Retarray.push ([X2, Y2]); return retarray;} Known two corners this.know2angles = function (angles, r) {this.edges = [];this.angles = [];this.angles = [Angles[0]/180*math.pi, Ang Les[1]/180*math.pi, (180-(angles[0]+angles[1))/180*math. pi];//set one side length of 10r = r > 0? r:10;//a Edge This.edges.push (r); var Anglea = This.angles[0];angleb = This.angles[1];anglec = this.angles[2];// B-Side This.edges.push (Math.sin (Angleb)/math.sin (Anglea) *r);//c side This.edges.push (Math.sin (Anglec)/math.sin (Anglea) *r ) var x0 = 0, y0 = 0;var x1 = x0 + this.edges[0], y1 = y0;var x2 = x0 + this.edges[1] * Math.Cos (-this.angles[2]), y2 = y0 + this.edges[1] * Math.sin (-this.angles[2]), var retarray = new Array (), Retarray.push ([x0, y0]); Retarray.push ([x1, Y1]); Retarray.push ([x2, Y2]); return retarray;} Known 2 edges and angles this.know2edges = function (edges, angle) {this.edges = [];this.angles = [];//] If no angle is specified on both sides, the default is 90 degrees angle = angle? A Ngle:90;var Edgec = 0;if (angle = =-90) {//set when the input angle is-90 refers to the known hypotenuse and a right-angled edge of the right triangle Var swap;if (Edges[0] < edges[1]) {swap = EDG Es[0];edges[0] = edges[1];edges[1] = swap;} Edgec = Math.sqrt (edges[0]*edges[0]-edges[1]*edges[1]); angle = Math.asin (Edgec/edges[0]);} else {angle = angle? angle/180*math.pi:math.pi/2;edgec = Math.sqrt (edges[0]*edges[0]+edgEs[1]*edges[1]-2*edges[0]*edges[1]*math.cos (angle));} This.edges = [Edges[0], edges[1], edgec];var edgea = This.edges[0],edgeb = this.edges[1];//angle is Radian units// A side corresponds to angle This.angles.push (Math.acos (Edgeb*edgeb + edgec*edgec-edgea*edgea)/(2*EDGEB*EDGEC));// B-side corresponding angle This.angles.push (Math.acos (Edgea*edgea + edgec*edgec-edgeb*edgeb)/(2*EDGEA*EDGEC));// C-side corresponding angle this.angles.push (angle); var x0 = 0, y0 = 0;var x1 = x0 + this.edges[0], y1 = y0;var x2 = x0 + this.edges[1] * math.co S (-this.angles[2]), y2 = y0 + this.edges[1] * Math.sin (-this.angles[2]); var retarray = new Array (); Retarray.push ([x0, y0]) ; Retarray.push ([x1, Y1]); Retarray.push ([X2, Y2]); return retarray;} Returns the angle and edge information of the string this.info = function () {var anglelabel = [' C ', ' A ', ' B '];var edgelabel = [' ab ', ' BC ', ' ac '];var s = '; for ( var i = 0; I < 3; i++) {s + = edgelabel[i]+ ': '; s + = this.edges[i].tofixed (2) + '; ';} for (var i = 0; i < 3; i++) {s + = anglelabel[i]+ ': '; s + = (THIS.ANGLES[I]*180/MATH.PI). toFixed (2) + '; ';} return s;} /*** @usage Triangle * @auThor mw* @date April 16, 2016 Saturday 07:50:31 * @param triangle six elements [Side 1, Edge 2, Edge 3, Angle 1, corner 2, Angle 3], angle is the angle of the edge, angle * @return The three vertex coordinates of the triangle * */this.solve = function (Elementarray) {//document.write (elementarray+ ' <br/> ');//Element a total of six var elements = Elementarray.length;if (Elements! = 6) {return [];} To find the element with '? ' means//such as [A, B, C, '? ', '? ', '? '] represents the known three-side, the solution triangle. var unknows_1 = 0, unknows_2 = 0;for (var i = 0; i < elements; i++) {if (elementarray[i] = = '? ') {if (I < 3) {//edge inside unknown unknows_1++;} else {unknows_2++;}}} Unknown element more than three, or only three corners, cannot be solved if (unknows_1 >= 3 | | unknows_1+unknows_2 > 3) {return [];} Known three-side if (Unknows_1 = = 0) {for (var i = 0; i < 3; i++) {if (elementarray[(i+1)%3] + elementarray[(i+2)%3] <= Elemen Tarray[i]) {//The sum of the two sides is less than or equal to the third side, which cannot form a triangle. return [];}} Known three-side return this.know3edges ([elementarray[2], elementarray[0], elementarray[1]]);} if (unknows_1 = = 1) {//cannot use sine formula, use cosine formula for (var i = 0; i < 3; i++) {if (elementarray[i] = = '? ' && (Elementarray [(i+1)%3]! = '? ' && elementarray[(i+1)%3+3] = = '? ') && (elementarray[(i+2)%3]! = '? ' && elementarray[(i+2)%3+3] = = '? ')) {var b = elementarray[(i+1)%3], C = elementarray[(i+2)%3],a = Elementarray[i+3];var A = math.sqrt (B*b+c*c-2*b*c*math.cos ( A/180*MATH.PI)); Elementarray[i] = A;break;}} if (elementarray[0]! = '? ' &&elementarray[1]! = '? ' &&elementarray[2]! = '? ') {return this.know3edges ([elementarray[2], elementarray[0], elementarray[1]]);}} At least two corners are known, you can find the three corners of the if (unknows_2 = = 1) {for (var i = 0; i < 3; i++) {if (elementarray[i+3] = = '? ' &&elementar ray[(i+1)%3+3]! = '? ' &&elementarray[(i+2)%3+3]! = '? ') {Elementarray[i+3] = 180-(elementarray[(i+1)%3+3]+elementarray[(i+2)%3+3]); Various cases in which the sine formula can be used//sine formula A/sina = B/SINB = C/sinc = Sinvaluevar Sinvalue = 0;for (var i = 0; i < 3; i++) {if (elementarray[ I]! = '? ' && elementarray[i+3]! = '? ') {sinvalue = Elementarray[i]/math.sin (ELEMENTARRAY[I+3]/180*MATH.PI); break;}} By a known side or triangle side, and two or three sides triangular for (var i = 0; I < 3; i++) {if (elementarray[i] = = '? ' && elementarray[i+3]! = '? ') {Elementarray[i] = Sinvalue*math.sin (ELEMENTARRAY[I+3]/180*MATH.PI);} if (elementarray[i]! = '? ' && elementarray[i+3] = = '? ') {Elementarray[i+3] = Math.asin (Elementarray[i]/sinvalue)/math.pi*180;}} if (elementarray[0]! = '? ' &&elementarray[1]! = '? ' &&elementarray[2]! = '? ') {return this.know3edges ([elementarray[2], elementarray[0], elementarray[1]]);} There are also horns not obtained for (var i = 0; i < 3; i++) {if (elementarray[i+3] = = '? ') {Elementarray[i+3] = 180-(elementarray[(i+1)%3+3]+elementarray[(i+2)%3+3]); Edge-by-angle for (var i = 0; i < 3; i++) {if (elementarray[i] = = '? ' && elementarray[i+3]! = '? ') {Elementarray[i] = Sinvalue*math.sin (ELEMENTARRAY[I+3]/180*MATH.PI);}} Test for (var i = 0; i < 3; i++) {if (elementarray[i+3] <= 0) {///angle negative or 0, stating that the given condition is not sufficient to form a triangle return [];}} document.write (elementarray+ ' <br/> ');//ab--BC--Careturn this.know3edges ([elementarray[2], Elementarray[0], elementarray[1]]);}} </span>


With it, the triangle God Horse, for Xiao Wei is not what.




<span style= "FONT-SIZE:18PX;" >if (1) {var r =;            Config.setsector (1,1,1,1);              Config.graphpaper2d (0, 0, R);            Config.axis2d (0, 0, in);  var scale = 2;//Triangular three-side length var a = 3, B = 4, c = 5;var triangle = new triangle (); var transform = new transform (); var array = Triangle.solve ([42.9, '? ', '? ', 32, 81.8, '? ']); Shape.angledraw (transform.translate (array, -200/scale, 0), ' red ', scale);          Shape.areadraw (array, ' red ', scale); document.write (array+ ' <br/> ');} </span>








<span style= "FONT-SIZE:18PX;" >if (1) {var r =;            Config.setsector (1,1,1,1);              Config.graphpaper2d (0, 0, R);            Config.axis2d (0, 0, in);  var scale = 4;var triangle = new triangle (), var transform = new transform (); var array = Triangle.solve (['? ', 60, 34, 41, ' ?', '?']); Shape.angledraw (transform.translate (array, -200/scale, 0), ' red ', scale);          Shape.areadraw (array, ' red ', scale); document.write (array+ ' <br/> ');</span>




<span style= "FONT-SIZE:18PX;" >if (1) {var r =;            Config.setsector (1,1,1,1);              Config.graphpaper2d (0, 0, R);            Config.axis2d (0, 0, in);  var scale = 1.5;var triangle = new triangle () var transform = new transform (); var array = Triangle.solve ([134.6, 87.8, 161 .7, '? ', '? ', '? ']); Shape.angledraw (transform.translate (array, -200/scale, 0), ' red ', scale);          Shape.areadraw (array, ' red ', scale); document.write (array+ ' <br/> ');} </span>



<span style= "FONT-SIZE:18PX;" >if (1) {var r =;            Config.setsector (1,1,1,1);              Config.graphpaper2d (0, 0, R);            Config.axis2d (0, 0, in);  var scale = 3;var triangle = new triangle (), var transform = new transform (), var array = triangle.solve ([22, 25, '? ', 133, '?', '?']); Shape.angledraw (transform.translate (array, -200/scale, 0), ' red ', scale);          Shape.areadraw (array, ' red ', scale); document.write (array+ ' <br/> ');} </span>


If the triangle gives the condition does not satisfy the formation triangle, the small Wei's tool is not to draw this diagram, but also does not have the error.




Let's draw a few triangles to play with:


(1) Three sides known

var array = Triangle.solve ([4, 5, 6, '? ', '? ', '? ']);



(2) Diagonal SSA known on both sides and one side

var array = Triangle.solve ([4, 5, '? ', 30, '? ', '? ']);



(3) Known SAS

var array = Triangle.solve ([4, 5, '? ', '? ', '? ', 30]);



(4) Aas

var array = Triangle.solve ([4, '? ', '? ', 50, '? ', 30]);



(5) Angular corner ASA

var array = Triangle.solve ([4, '? ', '? ', '? ', 50, 30]);






The end of this section, to know how to funeral, please see tell.

[Learn maths from the beginning] the 180th section to solve the triangle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.