C Program to impliment Fish Movement

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
#include<time.h>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
#include<graphics.h>
 
void main()
{
	int gd=DETECT,gm;
	int x=10,y=200,x1=675,y1=380;
	int stangle=35,endangle=140,radius=90;
 
	initgraph(&gd,&gm,"..\\bgi");
 
	while(!kbhit())
	{
		cleardevice();
		setbkcolor(BLACK);
 
		if(x<640)
		{
			x+=5;
			y+=1;
			arc(x,y,stangle,endangle+35,radius);
			arc(x,y-110,190,323,radius+2);
			circle(x+40,y-60,5);
			line(x-90,y-90,x-90,y-8);
		}
		else
		{
			x1-=5;
			y1-=1;
			arc(x1,y1,stangle-30,endangle+4,radius);
			arc(x1,y1-110,217,350,radius+2);
			circle(x1-40,y1-60,5);
			line(x1+90,y1-90,x1+90,y1-10);
		}
		setcolor(YELLOW);
		delay(90);
	}
	closegraph();
}
Editorial Team
Editorial Team

We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.

6 thoughts on “C Program to impliment Fish Movement

  1. I worked on a cgdarirte emulator for the NES many years ago when I was just getting into FPGAs. had an FPGA, some flash, some SRAM, and card-edge connectors for NES, SNES & N64. We got the SNES and N64 working, and managed Tennis on the NES but with snowy graphics.The problem with NES of course is the asynchronous buses. Unfortunately we only had a single bus for the flash/SRAM on the board so the only option was to time-multiplex the two NES buses. We could generate a clock up to 80MHz on the board. I started looking at the timing in more detail but moved on to emulation of complete systems before I got to far into it. IIRC the access pattern on the CHR bus was actually less random than appeared on 1st glance and I deduced it would be possible to cache some data in the FPGA in order to reduce the number of accesses to flash/SRAM.I really should re-visit that project. I know a lot more about FPGA design now than I did back then. We got around 6 PCBS made and two boards assembled and it cost around AUD$1,000. Unfortunately we took a short-cut and used a custom DC-DC converter from another project and we have no more of those. Won’t make that mistake again! But the two boards should still be working.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in