# Month: October 2018

### JDBC

### JDBC HOW TO MAKE A TABLE IN ORACLE DATABASE THROUGH JDBC

### HOW TO UPDATE DATA IN ORACLE DATABASE VIA JDBC

### HOW TO UPDATE DATA IN ORACLE DATABASE THROUGH JDBC

### UPDATE ROW

### HOW TO DELETE A ROW IN ORACLE DATABASE THROUGH JDBC

### HOW TO RETRIEVE DATA FROM ORACLE DATABASE TO CONSOLE

### HOW TO USE PREPARED STATEMENT IN JAVA FOR ORACLE DATABASE

### Haryana CSR summit

### Government of Haryana Organizing CSR Summit

Date -12 November 2018

venue: Power grid corporation Ltd. sec-29,gurugram

Registration started

**Chief guest- Chief minister of Haryana Sh. Manohar Lal**

Guest of honor

**sh. vipul goel Industries & commerce minister Haryana****Rao Narbir singh PWD (B&R) and forest minister Haryana**

Haryana CSR Summit 2018 on 12th November 2018 at Power Grid Corporation India Limited, Sector 29 Gurugram. pic.twitter.com/HbbSkNVSMy

— DC Gurugram (@DC_Gurugram) 27 October 2018

## Get more information on : Click here

### The launch of Haryana Film Policy

### Blessed Manushi chillar during the launch of Haryana Film Policy, at Gurugram today. Haryana’s daughters have held our head high by representing our nation with dignity and grace in the global arena. We are proud of you all!

Chief minister manohar lal khattar on friday 20 october 2018 launch the “Haryana film policy”, aimed at promoting haryanvi films,local artist and cinema.

For the promotion of haryanvi films government will provide better facilities.

Chief minister also announced that film city would come in the state.

**Bollywood celebrities**– Rajkumar rao, satish kaushik and Miss world manushi chillar was available at the launch of “haryana film policy”

Blessed @ManushiChhillar during the launch of Haryana Film Policy, at Gurugram today. Haryana’s daughters have held our head high by representing our nation with dignity and grace in the global arena. We are proud of you all! pic.twitter.com/gDqmJpilys

— Manohar Lal (@mlkhattar) October 26, 2018

### World’s longest sea bridge is Hong-Kong–Zhuhai–Macau Bridge

### Hong-Kong–Zhuhai–Macau Bridge

Chinese President Xi Jinping has officially opened the world’s longest sea crossing bridge, nine years after construction first began.

Total length **55 km/-**

Including **six** lanes

Opened 24 October 2018

## Facts about Hong-Kong–Zhuhai–Macau Bridge

Designed to withstand earthquakes and typhoons

it was built using 400,000 tonnes of steel

About 30km of its total length crosses the sea of the Pearl River delta.

The **Hong Kong–Zhuhai–Macau Bridge** (**HKZMB** or **HZMB**) is a bridge–tunnel system, which consists of a series of three cable-stayed bridges and one undersea tunnel, as well as two artificial islands.

It spans the Lingdingyang channel, which connects Hong Kong with Macau and Zhuhai, three major cities on the Pearl River Delta. For the construction cost of the HZMB Main Bridge, the total contribution of the three places (Hong Kong, Mainland and Macau) will be RMB¥15.73 billion, among which the government of the Hong Kong will contribute RMB¥6.75 billion.^{} It is among the longest fixed-links in the world and is a major landmark in the area.

^{Full view of Bridge}

चीन ने बनाया समंदर पर दुनिया का सबसे लंबा पुल… pic.twitter.com/y27CwT0VgG

— BBC News Hindi (@BBCHindi) 23 October 2018

### Parallel Projection and Perspective Projection

## Parallel Projection

Parallel projection discards z-coordinate and parallel lines from each vertex on the object are extended until they intersect the view plane. In parallel projection, we specify a direction of projection instead of center of projection.

In parallel projection, the distance from the center of projection to project plane is infinite. In this type of projection, we connect the projected vertices by line segments which correspond to connections on the original object.

Parallel projections are less realistic, but they are good for exact measurements. In this type of projections, parallel lines remain parallel and angles are not preserved. Various types of parallel projections are shown in the following hierarchy.

## Perspective Projection

In perspective projection, the distance from the center of projection to project plane is finite and the size of the object varies inversely with distance which looks more realistic.

The distance and angles are not preserved and parallel lines do not remain parallel. Instead, they all converge at a single point called **center of projection** or **projection reference point**. There are 3 types of perspective projections which are shown in the following chart.

**One point**perspective projection is simple to draw.**Two point**perspective projection gives better impression of depth.**Three point**perspective projection is most difficult to draw.

The following figure shows all the three types of perspective projection −

### 3D Transformation

## Rotation

3D rotation is not same as 2D rotation. In 3D rotation, we have to specify the angle of rotation along with the axis of rotation. We can perform 3D rotation about X, Y, and Z axes. They are represented in the matrix form as below −

The following figure explains the rotation about various axes −

## Scaling

You can change the size of an object using scaling transformation. In the scaling process, you either expand or compress the dimensions of the object. Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result. The following figure shows the effect of 3D scaling −

In 3D scaling operation, three coordinates are used. Let us assume that the original coordinates are (X, Y, Z), scaling factors are (SX,SY,Sz)(SX,SY,Sz) respectively, and the produced coordinates are (X’, Y’, Z’). This can be mathematically represented as shown below −

S=⎡⎣⎢⎢⎢⎢Sx0000Sy0000Sz00001⎤⎦⎥⎥⎥⎥S=[Sx0000Sy0000Sz00001]

P’ = P∙S

[X′Y′Z′1]=[XYZ1]⎡⎣⎢⎢⎢⎢Sx0000Sy0000Sz00001⎤⎦⎥⎥⎥⎥[X′Y′Z′1]=[XYZ1][Sx0000Sy0000Sz00001]

=[X.SxY.SyZ.Sz1]=[X.SxY.SyZ.Sz1]

## Shear

A transformation that slants the shape of an object is called the **shear transformation**. Like in 2D shear, we can shear an object along the X-axis, Y-axis, or Z-axis in 3D.

As shown in the above figure, there is a coordinate P. You can shear it to get a new coordinate P’, which can be represented in 3D matrix form as below −

Sh=⎡⎣⎢⎢⎢⎢1shxyshxz0shyx1shyz0shzxshzy100001⎤⎦⎥⎥⎥⎥Sh=[1shxyshxz0shyx1shyz0shzxshzy100001]

P’ = P ∙ Sh

X′=X+ShyxY+ShzxZX′=X+ShxyY+ShxzZ

Y′=ShxyX+Y+shzyZY′=ShyxX+Y+shyzZ

Z′=ShxzX+ShyzY+ZZ′=ShzxX+ShzyY+Z

## Transformation Matrices

Transformation matrix is a basic tool for transformation. A matrix with n x m dimensions is multiplied with the coordinate of objects. Usually 3 x 3 or 4 x 4 matrices are used for transformation. For example, consider the following matrix for various operation.

T=⎡⎣⎢⎢⎢⎢100tx010ty001tz0001⎤⎦⎥⎥⎥⎥T=[100001000010txtytz1] | S=⎡⎣⎢⎢⎢⎢Sx0000Sy0000Sz00001⎤⎦⎥⎥⎥⎥S=[Sx0000Sy0000Sz00001] | Sh=⎡⎣⎢⎢⎢⎢1shxyshxz0shyx1shyz0shzxshzy100001⎤⎦⎥⎥⎥⎥Sh=[1shxyshxz0shyx1shyz0shzxshzy100001] |

Translation Matrix |
Scaling Matrix |
Shear Matrix |

Rx(θ)=⎡⎣⎢⎢⎢10000cosθsinθ00−sinθcosθ00001⎤⎦⎥⎥⎥Rx(θ)=[10000cosθ−sinθ00sinθcosθ00001] | Ry(θ)=⎡⎣⎢⎢⎢cosθ0−sinθ00100sinθ0cosθ00001⎤⎦⎥⎥⎥Ry(θ)=[cosθ0sinθ00100−sinθ0cosθ00001] | Rz(θ)=⎡⎣⎢⎢⎢cosθsinθ00−sinθcosθ0000100001⎤⎦⎥⎥⎥Rz(θ)=[cosθ−sinθ00sinθcosθ0000100001] |

Rotation Matrix |

### 3-Dimensional Display Methods – 3D Computer Graphics

In the 2D system, we use only two coordinates X and Y but in 3D, an extra coordinate Z is added. 3D graphics techniques and their application are fundamental to the entertainment, games, and computer-aided design industries. It is a continuing area of research in scientific visualization.

Furthermore, 3D graphics components are now a part of almost every personal computer and, although traditionally intended for graphics-intensive software such as games, they are increasingly being used by other applications.

## Parallel Projection

Parallel projection discards z-coordinate and parallel lines from each vertex on the object are extended until they intersect the view plane. In parallel projection, we specify a direction of projection instead of center of projection.

In parallel projection, the distance from the center of projection to project plane is infinite. In this type of projection, we connect the projected vertices by line segments which correspond to connections on the original object.

Parallel projections are less realistic, but they are good for exact measurements. In this type of projections, parallel lines remain parallel and angles are not preserved. Various types of parallel projections are shown in the following hierarchy.

## Orthographic Projection

In orthographic projection the direction of projection is normal to the projection of the plane. There are three types of orthographic projections −

- Front Projection
- Top Projection
- Side Projection

## Oblique Projection

In oblique projection, the direction of projection is not normal to the projection of plane. In oblique projection, we can view the object better than orthographic projection.

There are two types of oblique projections − **Cavalier** and **Cabinet**. The Cavalier projection makes 45° angle with the projection plane. The projection of a line perpendicular to the view plane has the same length as the line itself in Cavalier projection. In a cavalier projection, the foreshortening factors for all three principal directions are equal.

The Cabinet projection makes 63.4° angle with the projection plane. In Cabinet projection, lines perpendicular to the viewing surface are projected at ½ their actual length. Both the projections are shown in the following figure −

## Isometric Projections

Orthographic projections that show more than one side of an object are called **axonometric orthographic projections**. The most common axonometric projection is an **isometric projection** where the projection plane intersects each coordinate axis in the model coordinate system at an equal distance. In this projection parallelism of lines are preserved but angles are not preserved. The following figure shows isometric projection −

## Perspective Projection

In perspective projection, the distance from the center of projection to project plane is finite and the size of the object varies inversely with distance which looks more realistic.

The distance and angles are not preserved and parallel lines do not remain parallel. Instead, they all converge at a single point called **center of projection** or **projection reference point**. There are 3 types of perspective projections which are shown in the following chart.

**One point**perspective projection is simple to draw.**Two point**perspective projection gives better impression of depth.**Three point**perspective projection is most difficult to draw.

The following figure shows all the three types of perspective projection −

## Translation

In 3D translation, we transfer the Z coordinate along with the X and Y coordinates. The process for translation in 3D is similar to 2D translation. A translation moves an object into a different position on the screen.

The following figure shows the effect of translation −

A point can be translated in 3D by adding translation coordinate (tx,ty,tz)(tx,ty,tz) to the original coordinate (X, Y, Z) to get the new coordinate (X’, Y’, Z’).

T=⎡⎣⎢⎢⎢⎢100tx010ty001tz0001⎤⎦⎥⎥⎥⎥T=[100001000010txtytz1]

P’ = P∙T

[X‘Y‘Z‘1]=[XYZ1]⎡⎣⎢⎢⎢⎢100tx010ty001tz0001⎤⎦⎥⎥⎥⎥[X′Y′Z′1]=[XYZ1][100001000010txtytz1]

=[X+txY+tyZ+tz1]

### Text Clipping in computer graphics

## Text Clipping

Various techniques are used to provide text clipping in a computer graphics. It depends on the methods used to generate characters and the requirements of a particular application. There are three methods for text clipping which are listed below −

- All or none string clipping
- All or none character clipping
- Text clipping

The following figure shows all or none string clipping −

In all or none string clipping method, either we keep the entire string or we reject entire string based on the clipping window. As shown in the above figure, STRING2 is entirely inside the clipping window so we keep it and STRING1 being only partially inside the window, we reject.

The following figure shows all or none character clipping −

This clipping method is based on characters rather than entire string. In this method if the string is entirely inside the clipping window, then we keep it. If it is partially outside the window, then −

- You reject only the portion of the string being outside
- If the character is on the boundary of the clipping window, then we discard that entire character and keep the rest string.

The following figure shows text clipping −

This clipping method is based on characters rather than the entire string. In this method if the string is entirely inside the clipping window, then we keep it. If it is partially outside the window, then

- You reject only the portion of string being outside.
- If the character is on the boundary of the clipping window, then we discard only that portion of character that is outside of the clipping window.

## Comments