Package model.util

Examples of model.util.Point3D


                { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }
        };
    }

    public void test_saccadeRetinaToNewPositionAndGetWhatItSees() throws IOException {
        int[][] seenAreaFittedToRetinaSize = this.imageViewer.saccadeRetinaToNewPositionAndGetWhatItSees(new Point3D(33, 33, 33));
        assertTrue(Arrays.deepEquals(this.twoDotBMP, seenAreaFittedToRetinaSize));
        assertEquals(66, seenAreaFittedToRetinaSize.length);
        assertEquals(66, seenAreaFittedToRetinaSize[0].length);

        int[][] shiftToTheLeftAndZoomIn = this.imageViewer.saccadeRetinaToNewPositionAndGetWhatItSees(new Point3D(16, 33, 25));
        assertEquals(66, shiftToTheLeftAndZoomIn.length);
        assertEquals(66, shiftToTheLeftAndZoomIn[0].length);
        assertTrue(Arrays.deepEquals(this.twoShiftedToTheLeftZoomedIn, shiftToTheLeftAndZoomIn));

        //RegionConsoleViewer.printDoubleIntArray(shiftToTheLeftAndZoomIn);
View Full Code Here


            newBoundingBoxZPosition = averageRegionZ * averageRegionZMultipliedByThisNumberEqualsNewBoundingBoxZPosition;
        } else {
            // do not manipulate variable newBoundingBoxZPosition
        }

        return new Point3D(newBoundingBoxXPosition, newBoundingBoxYPosition, newBoundingBoxZPosition);
    }
View Full Code Here

        int height = numberOfRowPixels; // Y-Axis
        int width = numberOfColumnPixels; // X-Axis
        int depth = (int) distanceZAwayFromImageToSeeEntireImage; // Z-Axis
        this.boxRetinaIsStuckIn = new BoundingBox(width, height, depth);

        this.retinaPositionWithinBox = new Point3D(width/2, height/2, depth);
    }
View Full Code Here

    public void setUp() {
        this.layer5Region = new Layer5Region("layer 5 region", 100, 200, 1, 20, 3);
    }

    public void test_getMotorOutputOnInactiveRegion() {
        assertEquals(new Point3D(0, 0, 0), this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33)));
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionToLeft() {
        this.layer5Region.getColumn(50, 1).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0.66, newRetinaPosition.getX(), 0.001);
        assertEquals(33, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionToRight() {
        this.layer5Region.getColumn(50, 99).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(65.34, newRetinaPosition.getX(), 0.001);
        assertEquals(33, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionUp() {
        this.layer5Region.getColumn(1, 50).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(33, newRetinaPosition.getX(), 0.001);
        assertEquals(0.66, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionDown() {
        this.layer5Region.getColumn(99, 50).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(33, newRetinaPosition.getX(), 0.001);
        assertEquals(65.34, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_zoomInNewRetinaPosition() {
        this.layer5Region.getColumn(1, 150).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition.getX(), 0.001);
        assertEquals(0, newRetinaPosition.getY(), 0.001);
        assertEquals(0.33, newRetinaPosition.getZ(), 0.001);

        // There should be no change along the newRetinaPositionZ when other neurons are active/predictive
        // since the X & Y positions are not used for calculating zooming in & zooming out.
        this.layer5Region.getColumn(1, 101).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition2 = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition2.getX(), 0.001);
        assertEquals(0, newRetinaPosition2.getY(), 0.001);
        assertEquals(0.33, newRetinaPosition2.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_zoomOutNewRetinaPosition() {
        this.layer5Region.getColumn(99, 150).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition.getX(), 0.001);
        assertEquals(0, newRetinaPosition.getY(), 0.001);
        assertEquals(32.67, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

TOP

Related Classes of model.util.Point3D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.