Skip to content

Commit

Permalink
Merge pull request #39 from opennars/HigherResolution1
Browse files Browse the repository at this point in the history
Higher resolution1
  • Loading branch information
patham9 authored Jul 9, 2019
2 parents f896e03 + f8b2365 commit ee0b3b5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/opennars/applications/crossing/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,12 @@ public void draw(PApplet applet, TruthValue truth, long time) {
}
if(!isPredicted) {
//applet.rect((float) (0.0f-width/2.0f), (float) (0.0f-height/2.0f), (float) width, (float) height);
float mul2 = 2.0f;
float mul2 = 1.0f; //80.0f/100.0f;
if(RealCrossing.running) {
applet.ellipse(2.5f, 2.5f, Util.discretization*scale*mul2, Util.discretization*scale*mul2);
applet.ellipse(0.0f, 0.0f, Util.discretization*scale*mul2, Util.discretization*scale*mul2);
} else {
applet.ellipse(2.5f, 2.5f, Util.discretization*scale, Util.discretization*scale);
}

}

if(RealCrossing.running) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,19 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane5" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="saveQANarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopSaveQANarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="3" groupAlignment="3" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
<Component id="savePredictionNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopSavePredictionNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="logOutputCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="saveLocationNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopSaveLocationNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="3" groupAlignment="3" attributes="0">
<Component id="savePredictionNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopSavePredictionNarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="logOutputCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="saveQANarButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="stopSaveQANarButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="23" max="32767" attributes="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,16 +351,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(saveQANarButton)
.addComponent(stopSaveQANarButton)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(saveLocationNarButton)
.addComponent(stopSaveLocationNarButton)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(savePredictionNarButton)
.addComponent(stopSavePredictionNarButton)
.addComponent(logOutputCheckBox))))
.addComponent(logOutputCheckBox))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(saveLocationNarButton)
.addComponent(stopSaveLocationNarButton)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(saveQANarButton)
.addComponent(stopSaveQANarButton)))
.addContainerGap(23, Short.MAX_VALUE))
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ void inform(List<Entity> entities) {
info.add(typeInfo);
locationNar.addInput(typeInfo);
//also give info about position at labelled locations
int X = (int) (ent.posX / Util.discretization);
int Y = (int) (ent.posY / Util.discretization);
String subj = X + "_" + Y;
String locationnarInput = "<(*,"+EntityToNarsese.name(ent)+","+Util.positionToTerm((int)ent.posX,(int)ent.posY)+") --> at>. :|:";
locationNar.addInput(locationnarInput);
System.out.println("location nar input: " + locationnarInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public static void main(String[] args) {
//</editor-fold>
System.out.println("args: videopath trackletpath [discretization movementThreshold]");
System.out.println("example: java -cp \"*\" org.opennars.applications.crossing.RealCrossing /mnt/sda1/Users/patha/Downloads/Test/Test/Test001/ /home/tc/Dateien/CROSSING/Test001/ 100 10");
Util.discretization = 50;
Util.discretization = 80;
if(args.length == 2) {
RealCrossing.videopath = args[0];
RealCrossing.trackletpath = args[1];
Expand Down

0 comments on commit ee0b3b5

Please sign in to comment.