top of page

[July 31st - Aug. 5th] Week 7 Report

By the mid of this week, I've almost finished building primitives(Though artifacts may still exist ...) and start to work on the marriage of nodes/edges.Further, the marriage to Grind.

 

This week's work

1.Reconstruct straight line & arrow logistic

To make better use of GPU, compute absolute position using modelMatrix instead of doing it manually when it is possible. To be specific:

a.) Separate straight and curve line logic.

b.)For straight line, it's possible to use transformation: use scale/ translate/ rotating to convert a standard horizontal line with length = 1(-0.5<x<0.5) to any start/end position with any length.

c.) For curve line , points should be recomputed as before.

Samples for drawing straight / curve line are presented.

DrawLineDemo.java

drawCurveDemo.java

2. Change dest/src position of Edges freely

In Cytoscape, edges are changed while the corresponding nodes move.Which means, the source and destination position of line should be changed freely as assigned.

a.) For straight, only change modelMatrix properly

b.) For curve, whether move control points or change src/dest, all points should be regenerated.

Also, Synthesis hit test for all kinds of lines.

3.Separate Node from its Buffer and Edge from its Buffer.

Previously, I assigned each object its own buffer(VBO / EBO if needed).When initialize the object, buffers are generated along vertices data passed.

However, to dynamically add /delete objects. This does't work fine for buffer has to be allocated(even though no data inside) before drawing.

Solution is:

a.)Design a large buffer object for nodes/ edges separately.

b.)Attach a factory with a such buffer object

c.)Pre-allocated N bytes space.When space not enough, double it.

Notice!!

a.)[Finish] Keep the possibility that to create a node/edge separately in advance,which means, sometimes we do not need a uniform buffer object.

b.)[TODO] Only works for solid straight line now. Synthesis all possible edges later

6.Relation between edge and node: Movement should be all together.

As said before, when the nodes' position change, source/dest of edges also change.

In drawNodeAndEdgeDemo.java, we hold a hashMap<Node, EdgeList> to describe how nodes and edges related.Once node's position change, update the corresponding edges.

7.Investigate how to marry to Grind.

Still hard for me.... After discussion, much clear maybe...

 

Next week:

1.Synthesis all possible arrow/line shapes for dynamic edges. Modify line artifacts if possible.

2. Work for deleting objects in buffer, a circulate pointer may be needed.

3. Investigate how to connect Grind with my work....

bottom of page