wiki:LocusLineEquation/Blog
Last modified 23 months ago Last modified on 07/13/10 01:01:10

07/12/2010

My contributions for the first part of the first part of GSoC 2010 can be divided in two: general improvements and coding.

==General improvements==

I made a few general improvements on GeoGebra:

  1. Refactored build.dir in ant build file. Previously, build.dir wasn't in the root directory.
  2. A few ant tasks were added, such compile-grammar, compile-oe (outside Eclipse), run-easyb and run-easyb-outside-eclipse.
  3. SVN properties were set in order to work outside Eclipse. This way, .class files will be kept out of the repo without the intervention of any Eclipse plugin.
  4. Easyb, a BDD groovy-based framework, has been included in order to test GeoGebra. It is not RSpec, but I guess it'll do.

==Coding==

First, I started creating a few EquationPoint classes, currently there are six EquationPoint children classes:

http://dev.geogebra.org/trac/raw-attachment/wiki/LocusLineEquation/Blog/Selecci%C3%B3n_003.png

  • EquationFreePoint represents an independent point.
  • EquationSymbolicPoint represents a dependent point, EquationSpecialSymbolicPoint standing only for the locus point.
  • EquationNormalPoint and EquationPointVectorPoint are only auxiliar elements.

Then, a few EquationElement classes were added, these stand for the different constructions:

http://dev.geogebra.org/trac/raw-attachment/wiki/LocusLineEquation/Blog/Selecci%C3%B3n_001.png

EquationElement is an abstract class containing a few basic methods:

  • forPoint: Given an EquationPoint, returns a String with the equation that means that the point is in the construction.
  • isAlgebraic: returns true if the construction is algebraic, and false otherwise.

Both EquationGenericCircle and EquationGenericLine are abstractions of specific line and circle contructions, all of them algebraic. EquationGenericSegment is to segment what EquationGenericLine is to lines. Obviously, EquationGenericSegment is not algebraic.

All of these classes are used together by EquationScope.

==A pause for a screenshot.==

http://dev.geogebra.org/trac/raw-attachment/wiki/LocusLineEquation/Blog/Selecci%C3%B3n_002_modificada.png

Click for enlarge.

==A glimpse into the future.==

What to do next?:

  • Maybe Equation should be a proper class, not just a String.
  • More equations.
  • Working out the locus equation.
  • Not using an algorithm twice.

06/22/2010

Getting rid of Subversive. Installing Subclipse.

06/21/2010

After implementing a few classes about different types of points and a scope for them, I looked for what kind of testing is in GeoGebra. Since I found none, I ask Markus about it. Confirmed, there were no testing in GeoGebra, but Markus seemed interested in adding testing to it.

I have been looking to some BDD libraries in Java, having found two quite good options.

  1. JDave:
  • Uses JUnit adapter, so it can be easily integrated in Eclipse.

  • Only Java, so:
    • No need to learn a new language.
    • It's Java! Look at the examples page. There's a lot of code for such simple specs!
  1. easyB:
  • Based on Groovy, so:
    • A new language to be learnt.
    • Groovy is a superset of Java, so test can be written in pure Java.
    • It is pretty easy to use (take a look at the YouTube video, only the first four minutes are actually needed).

I would go with option 2 because if a lot of code is needed for writing a test, in the end nobody will use it, but I'll email Markus and Michael to be sure.

05/27/2010

Today I've been looking inside some classes. For that, I used the ggb-script.

  1. Run init.rb with JRuby.
  1. Type
@wnd.visible = true
  1. Construct a line through two points (simple, isn't it?). Then create a point on the line between the other two.
  1. Type
A,B,a,C = @app.gsco.to_a

gsco stands for geoSetConstructionOrder. Be aware that in Ruby, variable names starting with a capital letter are constants, but don't worry.

  1. Look!
A.algorithm_list.to_a[0].output.to_a[0] == a
B.algorithm_list.to_a[0].output.to_a[0] == a
a.algorithm_list.to_a[0].output.to_a[0] == C
C.parent_algorithm.input.to_a[0] == a

They all return true! More this weekend.

05/26/2010

I made an script to get a console in order to inspect what is happening in GeoGebra while using it. It can be found here: http://github.com/Serabe/ggb-script

05/19/2010

I met Miguel at the faculty. After a two-hours-long talk, the idea of the project got clearer. Time to look for some answers.

Attachments