Pages

Sunday, January 17, 2016

Geometry part 3

In the post Geomety part 2, we had demonstrated the construction work that Mathcalc8 can do to verify two theorems. However, the construction procedure on that post can only produce one single construction at a time. In this post, we introduce the use of variables so that we can make more flexible construction work. We start with problem for single variable.
1/ Refered to the diagram below :


The question is : what is the value of angle edb ?
As before, we set point 'a' at origin.
Input 1 : a=gpt(0,0)
Ans. set a = 0, 0, 0
Instead of creating a single random point of b just like the method what we had used on Geometry part 2, we set point 'b' as a function of x of an variable point with coordinate (x,0) :
Input 2 : b='gpt(x,0)'
Point 'd' is then also a function of x determined by :
Input 3 : d='intersect(gline(a,80),gline(b,110))'
And point 'e' is determined by :
Input 4 : ex='intersect(gline(a,60),gline(b,100))'
It is reminded that since we cannot set variable name as 'e' because the symbol 'e' had been used to represent power of 10. Therefore we uses another symbol 'ex' to represent the intersection point e.
The power to use variable x is that in this moment, we can set a list of random values for x and then we can calculate the angle between ex, d, and b as a function of x :
First, a list of 10 random values of x which ranged from 0 to 50 is set :
Input 5 : r = random(10,0,1000)/100
Ans. set r = 45.47, 1.15, 30.31, 43.77, 27.27, 18.31, 34.21, 21.15, 22.63, 26.96
Then, we try to find the value of the target angle by using this list of r for x :
Input 6 :table('anglepts(ex,d,b)',r)
Ans. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
It can be seen that for different value of x which we had set using the list of r, the angles edb calculated are the same and equal to 20. Therefore, the answer we guessed is 20.
Next, we deal with a practical problem.
2/ Refered to the diagram below :


A person with a height around 1.7 m is viewing a painting which is h meter high and hanged on a wall at 2 meter from ground. The person is at a distance of x m from the wall. What is the value of x to obtain the best viewing angle bdc of the painting ?
For best viewing viewing angle, it is meant to maximize the angle bcd. Our task is to found an optimal x that maximize angle bcd for various heights of the painting h. This is a problem that involved two variables x and h.
Input 7 : clear()
Set points a, b, c and d :
Input 8 : a='gpt(x,0)'
Ans. set a = gpt(x,0)
Input 9 : b='gpt(0,2+h)'
Ans. set b = gpt(0,2+h)
Input 10 : c='gpt(x,1.7)'
Ans. set c = gpt(x,1.7)
Input 11 : d=gpt(0,2)
Ans. set d = 0, 0, 2
The angle dbc is set as f :
Input 12 : f='anglepts(b,c,d)'
Ans. set f = angpts(b,c,d)
Suppose we set h = 1, then the formula for getting optimal x is :
Input 13 : table('fmaxi(f,0,3)',1,'h')
Ans. 0.624, 38.68
The above formula means that to use function fmaxi to find the maximum value of f with x searched between 0 to 3 m , given h equal to 1 m. The answer we get is x equal to 0.624 m and the viewing angle f is degree 38.68o.
To verify the result, we can plot f against x directly when h is set to 1 m as following :
Input 14 : plot('line','table(f,1,h)',0,3,0.1)
The resulting graph is shown below :


The curve of f has a peak when x is at around 0.62 m and the value of f is around 38.
With a small modification on input 13, we can put a list of h (0.5,1,1.5,2,2.5) into calculation.
Input 15 : table('fmaxi(f,0,3)',(0.5,1,1.5,2,2.5),'h')
Ans. 0.492, 27.04, 0.624, 38.68, 0.732, 45.58, 0.828, 50.28, 0.912, 53.75
The answers are pairs of values of x and f that corresponding to different values of h. The result is summarized on the following table :
hxviewing angle
0.50.49227.04
10.62438.68
1.50.73245.58
20.82850.28
2.50.91253.75

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.