- To translate an object by a vector v, each homogeneous vector p (written in homogeneous coordinates) would need to be multiplied by thistranslation matrix
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Write a program to perform translation.
1. EXPERIMENT- 2
Objective: - Write a program to perform translation.
Software Used: - Turbo c
Theory: - To translate an object by a vector v, each homogeneous vector p (written in
homogeneous coordinates) would need to be multiplied by thistranslation matrix:
As shown below, the multiplication will give the expected result:
Program :
#include <stdio.h>
#include <stdlib.h>
#include<graphics.h>
#include<conio.h>
#include<math.h>
void draw2d(int,int [],int [],int,int);
void main()
{
int gd=DETECT, gm;
int x[20],y[20],tx=0,ty=0,i,fs;
initgraph(&gd,&gm," C:TURBOC3BIN");
printf("No of edges : ");
scanf("%d",&fs);