# Two Tilted Rectangles

I found this problem from the wonderful Math with bad Drawings site in my news feed. They cite it from Carolina Shearer. Her twitter account contains more such nice problems. It is the kind of problem which seems only adequate for advanced students. Sometimes, you can solve them by looking at it in the right way. Most of the time, you will start a lengthy computation. Often, you will notice in retrospect that the solution was quite easy and you could have guessed it.

For this problem, I did not see the solution. The problem, of course, is to fit two equal rectangles into a square in the shown manner. For a start, try to find a reason why the point 1/2 on the lower side solves the problem. You can use the general fact that a=b+c in the figure below.

I admit that I did the computations using Euler Math Toolbox. That works. However, there is an elementary fact that can be used to prove a+b=c. For a hint, consult the following image. If the green lines are equal the red lines are equal.

# The Problem with recent Java Updates

It is fair to say that Oracle is not treating Java well. After the Ask-bar annoyance it is now bugging Java users with a faulty installation of the recent Java update. No surprise that Java loses more and more ground. Java was designed to be safer than native applications and easier to install and maintain. And it could have been the solution to many problems of current computer industry. But the contrary has happened, due to mistakes in the upper floors of Sun, Microsoft, Apple and recently Oracle, just to name the main players. The bashing of the Linux community was not helpful either.

Back to the recent problem for Java on Windows (maybe on Mac too): Oracle now introduces an incorrect link into the system path. While this link works in the command line it does not work for desktop items and associated files.

The first solution is to fix this link. Go to the system settings and search for the system variables. Replace the path to Java with the correct path („C:\Program Files\Java\jdk1.8.0_51\bin“ on my computer). Unfortunately, this path contains the Java version number. So you have to change this with every update.

For C.a.R., I have chosen another solution. To get the desktop icon working, I link to the jar file directly. Moreover, the link gets the proper icon for C.a.R. In earlier versions, I linked to javaw.exe which started the jar file. For the association of files to C.a.R., I associate to a batch file which calls javaw.exe. The path to the jar file must be contained in this call. Thus I create the batch file during the installation with another batch file.

I cannot do much about the problem with applets. Chrome decided to stop Java support in favor of JavaScript. Weather this is a wise decision I do not know. They should at least have given the option to install a Java runtime, and start it after acknowledgement by the user.

# C.a.R. / Z.u.L. and Java Permissions

Thanks to the fine people at our university we have now enabled the applets on the pages of C.a.R. (Compass and Ruler) and Z.u.L. (Zirkel und Lineal). The user does no longer have to put the site into the list of allowed sites in the Java configurations. The applets have a valid signature which is trusted by the main certificate authorities.

The process was not easy. I won’t go into any details. We needed to install the Mozilla browser since our description was based on that.

See here an example of an applet.

# Compass and Ruler – C.a.R. – Geometry Software

I have often spoken and written about computers in schools. E.g., see this paper for a conference in Rio. It is clear that software in schools is inevitable and necessary. It is also clear that it has its problems. Most of them are related to available hardware and also to the existing software. These problems might be resolved in a very near future by technological advances. But other problems concern the curricula and and the school system itself. Tests are a central part of it. Cynically, we can say that the only competence our kids learn is to answer well prepared test questions under time pressure. A self guided, research driven team learning with the computer as the main tool has no place in this system.

While I am interested in these questions and consequently in teacher education my research interests remained in approximation theory. Nevertheless, In 1988 I started a project in dynamic geometry on my old Atari ST just to see what could be done with an object oriented approach. This project was ported to OS/2 and to Windows, and finally rewritten in Java. At that time, it was novel and many people got interested in it. That was the beginning of C.a.R (Compass and Ruler), aka Z.u.L. in German. The primary idea, however, was not very deep and similar software existed, starting with Cabri or Geometer’s Sketchpad. Later came the star of today’s programs in Europe Geogebra.

C.a.R. followed the main ideas of dynamic geometry software. But what I tried to do is to implement advanced ideas in C.a.R. The following, e.g., are examples of main features of the program. Some were innovative.

• automatic generation of points and intersections by user click,
• automatic tracks, generated by a point moving along an object,
• automatic polar curves belonging to a set of lines,
• computed points depending on formulas,
• graphics export with preview depending on resolution and image size,
• transparency and other object features depending on computed formulas,
• generation and presentation of geometric construction problems,
• advanced macro generation with formulas and dependency checks,
• elliptic geometry with the Poincare model implemented with macros,
• automatic export of construction on web pages.

Most of these are now present in other programs. The graphics export, however, is still neglected in most systems.

Over the years, it became apparent that the program is not perfect, or rather, the times they are changing. So C.a.R. lagged behind more and more. What were the drawbacks and problems of C.a.R.?

• Teachers are more interested in Algebra than in Geometry now. While curves or graphs can be drawn in C.a.R. by formula, and a coordinate system is present, Geogebra e.g. puts this into the center of its interface. In contrast, the first versions of C.a.R. were centered around pure geometry without coordinates. Together with all the efforts of Geogebra in teacher assistance this puts the program into an advantage compared to C.a.R.
• Java in the browser is dead. The Java based Android system cannot even display applets! Much attention was put into applets in C.a.R. in vain. Of course, C.a.R. can perfectly be used on the desktop still. But newer system took a fresh start with JavaScript even though this inferior as a programming language. An example of this is JSXGraph. Admittedly, this approach makes it easy to generate programs that can be used on all operating systems. Thus it might be easier for schools, even on tablet computers.
• C.a.R. has only rudimentary support for 3D using its advanced macro features. A true 3D program like Archimedes Geo3D is much easier to use and more capable.
• The user interface of C.a.R was based on modal dialogs. This was remedied with CarMetal. Its development was based on C.a.R. going its own ways now. The interface is very nicely done. The files are not completely compatible, however.

In recent times, I am more interested in Euler Math Toolbox (EMT). While hybrid programs with numerical and algebraic features like this are still not used in schools I have the feeling that they are more useful than geometry programs of any kind. Moreover, EMT can do geometry too, albeit not interactively. It is nice to have C.a.R. for the teaching of geometry or for an easy way to create geometrical figures. But EMT is much more useful in schools and universities.

Software is changing. It is dying when new systems are born. Remarkably, C.a.R. was useful over so many years and it still is. But the new developments around JavaScript, the browsers, and the net point into other directions.

# Christmas Star

Ron Gerber sent me the same image, which he produced using my C.a.R. geometry program. I though Euler Math Toolbox might be a better choice. So I reproduced his image with EMT.

First of all, the command necessary for this are very few.

>x=mod((0:1:360)*31,360)°;
>fullwindow;
>plot2d(cos(4*x)*cos(x),cos(4*x)*sin(x),grid=0,thickness=0.5):

That’s it. The trick is based on the curve

$$\gamma(x) = \cos(4x) \, \left(\cos(x),\sin(x)\right), \quad x \in [0,2\pi].$$

The curve is divided into 360 points, and every 31th point is connected with a line segment. These segments yield the beautiful polar sets you see in the image above. Here, you see the 360 points.

Ron also tried some more parameters for this kind of curves. First we can use the basic curve

$$\gamma(x) = \cos(mx)^a \, \left(\cos(x),\sin(x)\right), \quad x \in [0,2\pi].$$

Then we can use every r-th point. Instead of r=31, every number without a common divisor to 360 makes sense. Using this and C.a.R., he produced a lot of nice stars.

In Euler, you can drag values too. The function to use is dragvalues(). It needs a drawing routine, which takes a vector of parameters. After the user interaction, it returns the current values. We use it draw the final choice of the user and insert the result into the notebook.

>function plotstar ([m,e,r]) ...
$fullwindow();$  x=mod((0:1:360)*r,360)°;
$plot2d(cos(m*x)^e*cos(x),cos(m*x)^e*sin(x),grid=0,thickness=0.5);$endfunction
>v=dragvalues("plotstar",["M","E","R"], ...
>   [4,1,31],[0,12;1,10;1,50], ...
>   stops=[12,9,49],digits=0, ...
>plotstar(v):

Here is another beauty.

# Problems with Java and local Applets

One user wrote to me because he had problems with the HTML export of C.a.R. constructions. Indeed, there are two problems.

• The security restrictions of Java forbid starting self signed applets on local web sites.
• The C.a.R. applet can not load the construction from the local file system.

The first problem could be solved. If you enter „Java Control Panel“ in the search, you can start this helper program. There you can lower the security level. However,  do you really want to do this? I doubt.Currently, I do not know how to solve the second problem.

If you upload the construction file e.g. test.zir, the HTML test.html and the zirkel.jar file you can open the HTML without problems. So the best solution seems to be to run a local web server. You can install XAMPP or run an Apache server on your Linux system.  In Windows, you need to start the xampp server before you start Skype, or make changes to the ports. But once you got a web server running, you can put the files into xampp/htdocs and access them via e.g. http://localhost/test.html.

# A Circle – or not?

In this video by H. Bortolossi I found an interesting problem. I do not understand all of the Portuguese, but the video was interesting nevertheless for me. Also it was nice to see my friend from Rio in action. This reminds me of my time in the most beautiful town of the world. Ah no – maybe that title goes to Venice, but it is close.

Look at the following construction.

The two blue segments are of equal length. The black and the green curves are circles with centers C1 and C2. The red curve is the track of M, when A walks round the black circle. Is the track a circle too?

The construction is done with the automatic track feature of C.a.R. The track has been made a construction object. We can then move the circles with the right mouse button. If we do that only a little bit, the track will look like a circle. But if we extend the movement, we get the following.

This speaks against the theory of a circle. The algebraic type of equations should remain the same, even in special cases. We can also check by putting three points on the track and constructing the circle through these points.

We need to carefully select a situation, where the cyan circle disagrees visually with the track. Here is magnification.

The difference is too large to be accounted to numerical errors. In fact, the track is not a circle. I did not investigate why it is so close to a circle. But I computed the equation of the track with Euler Math Toolbox. The equation of the line I got was

for a special case of the two circles. You can eliminate the square roots, and get an equation of degree 6, which does not factor. If the track was a circle, this circle should factor out. If you wish to try and see, paste the following commands into Euler Math Toolbox.

>eq &= (x-2)^2+y^2-10
>&solve(r1=1+(1-r)/2,r)
>eq1 &= eq with [x=x*(3-2/sqrt(x^2+y^2)),y=y*(3-2/sqrt(x^2+y^2))];
>eq3 &= num(factor(expand(eq1)));
>\$eq3=0 // needs Latex
>h &= 12*y^2+12*x^2-8*x;
>eq4 &= expand((eq3+h)^2-h^2)
>plot2d(eq3,level=0,a=-2,b=6,c=-4,d=4,levelcolor=green,n=100); ...
>plot2d("x^2+y^2-1",level=0,>add,levelcolor=black):