Giter Club home page Giter Club logo

convextransformationplanning's People

Contributors

cyrusxyl avatar nrahnemoon avatar sraina1 avatar

Watchers

 avatar  avatar  avatar  avatar

convextransformationplanning's Issues

Implement Ray Initialization

Ray will have startX, startY, endX, endY. For now, just assume startX and startY are row 38, col 16 for the dick_map.bmp. Then ray trace at some resolution.

startX, startY will be the center of the circle. endX and endY needs to be calculated based on the following criteria

Create Cell DataStructure, Read Map File and Create Cell*** version of the map

The map will be white (0) in all locations that are open and black (1) in all locations that are obstacles.

This task will involve reading a bmp image file, creating a Cell*** map. Such that Cell* points to a cell object. Cell** points to a col of cells. Cell*** points to a row of columns of cells. Similar to Project 2.

As far I can tell, all the Cell has to store is whether it's 0 or 1 (i.e., it's value).

Figure out how big the Cell** transformMap needs to be.

So if there are 100 border cells, can we just make a square that's ceiling(100/4) cells by ceiling(100/4) cells?

I.e., we're not really making a circle, but rather a square. Seems ok.

Only question then, is what happens when you have 101 cells? There will be empty cells along the perimeter. What do you think? I think that's fine if there are empty cells along the border, so long as the interior is filled up. We should spread the empty border cells.

I.e., We have 26 x 26 for 101 cells. But we need to make sure the 3 empty cells are far away from each other, so that the cells on the interior of the empty cells get filled up by the empty cells' neighbor.

Create a Vector<Cell*> of all the border cells

Figure out all the cells that are open that are on the border of being closed.

This is very simple. Just loop through all the cells, if a cell has value 0 and has any neighbor that's a 1, then it's a border cell.

Then the tricky part... the border cells need to be ordered such that the ray going through the center to the border cell is moving in a clockwise direction.

To do this, add a variable to the Cell object which keeps track of angle to start. Write a comparator class that uses the angle to start to compare 2 cells. Fill in the angle to start for all the border cells. Push all the border cells onto a priority queue, pop them off and they'll come off sorted ordered by angleToStart.

We'll use this "Vector<Cell*> borderCells" to create the transformed version of the map.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.