1 Replies - 740 Views - Last Post: 07 May 2010 - 09:27 PM Rate Topic: -----

#1 moonbeem888   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-May 10

Help with image processing- etchasketch

Posted 07 May 2010 - 06:13 PM

So first off I need to create a board that is 20 x 70 with a 2d array in a class.
which as you can see I have, I need help referencing the board and displaying it. The purpose is going to be for an etchasketch program (i decided to start over because somewhere I was lost). The cursor is going to be at [20][0] on the board. Then have to figure out how to make a character "draw" with ASCII '*' to a sequence(or string) of numbers (int) that will control the movement.
like so....
	cout<<"main()"<<endl;//to signal that main is called...
	cout<<":Image Processing with ASCII Character '#':\nDirection values:"<<endl;
	cout<<"   8  1  2"<<endl;
	cout<<"    \\ | /"<<endl;
	cout<<"     \\|/"<<endl;
	cout<<"7-----------3"<<endl;
	cout<<"     /|\\"<<endl;
	cout<<"    / | \\"<<endl;
	cout<<"   6  5  4"<<endl;


/******************************************************************************
* Program:
* Programmer: *******************
* Date : 
* Purpose:
* notes:
*******************************************************************************/
//______________________________________________________________________________
//-----------------------------headers------------------------------------------
#include<iostream>// for cin and cout msg display.
using namespace std;
//______________________________________________________________________________
//-----------------------------Global Variables---------------------------------
//______________________________________________________________________________
//-----------------------------Classes------------------------------------------
///////////////////////////////////////////////////////////////////////////////
class board
{
private:
public:
	grid[70[20];
};



///////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
//----------------------------Functions----------------------------------------

/******************************************************************************
* Function main()
parameters: n/a (null)
purpose: 
******************************************************************************/
int main()
{
	cout<<"main(); Function Start"<<endl;
	system("pause");
	return 0;
}




/******************************************************************************
* Function
parameters:
purpose: 
******************************************************************************/
//______________________________________________________________________________



Is This A Good Question/Topic? 0
  • +

Replies To: Help with image processing- etchasketch

#2 eker676   User is offline

  • Software Engineer
  • member icon

Reputation: 379
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Help with image processing- etchasketch

Posted 07 May 2010 - 09:27 PM

This is actually a very interesting project. Please don't use large fonts.

What operating system are you on?

If it's Windows then start cheering because this project just got a whole lot easier.

For a few hints look at the GetAsyncKeyState() function provided by Windows
GetAsyncKeyState() topic

And a modified gotoxy() function written by gabehabe:
gotoxy()

This post has been edited by eker676: 07 May 2010 - 09:27 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1