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:
- Refactored build.dir in ant build file. Previously, build.dir wasn't in the root directory.
- A few ant tasks were added, such compile-grammar, compile-oe (outside Eclipse), run-easyb and run-easyb-outside-eclipse.
- 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.
- 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:
- 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:
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.==
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.
- 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!
- Not based on JUnit, though it offers an Eclipse plug-in.
- 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.
- Run init.rb with JRuby.
- Type
@wnd.visible = true
- Construct a line through two points (simple, isn't it?). Then create a point on the line between the other two.
- 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.
- 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
-
Selección_003.png
(29.1 KB) -
added by sergio 23 months ago.
Type Hierarchy for EquationPoint
-
Selección_001.png
(31.1 KB) -
added by sergio 23 months ago.
Type Hierarchy for EquationElement
-
Selección_002_modificada.png
(279.4 KB) -
added by sergio 23 months ago.
Screenshot



