Subscribe Our Channel

header ads

Search This Blog

Sunday, August 2, 2026

Draw Lord Shiva (Bhole Ji) in C++ using Turbo C++ BGI Graphics Library

Draw Lord Shiva (Bhole Ji) in C++ using Turbo C++ BGI Graphics Library



In this tutorial, you will learn how to program and draw a detailed face of Lord Shiva (Bhole Ji) using C++ Graphics (graphics.h) in Turbo C++!

🌟 Key Code Elements Covered:

  • Facial Features & Third Eye: Using ellipse() and arc() functions to construct Shiva's eyes, eyebrows, lips, ears, and third eye.

  • Tripundra & Forehead Lines: Drawing the sacred three forehead lines with precision line algorithms.

  • Triangular Jata & Crescent Moon: Layering ellipses and arcs to form the hair bun (Jata) and right-side crescent moon.

  • Cobra Snake (Vasuki): Detailed left-side snake structure using stacked ellipses and custom red hood detailing.

  • Trishul & Damru: Rendering the trident spear and center drum using line() and circle() coordinates.

  • Dynamic Color Cycling Loop: Using a for loop with delay() and setcolor() to create an animated multi-color glowing effect.

This project is a classic C++ graphics assignment, perfect for computer science students, Turbo C++ developers, and coding enthusiasts learning 2D graphics primitive functions!

Don't forget to Like, Share, and Subscribe to Computer Soft Skills for more awesome coding tutorials!


 //************************* HAR HAR MAHADEV *******************************//


//_______________ PROGRAM TO DRAW BHOLE JI USING C++ ___________________//


//----------WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL------------//




#include<conio.h>

#include<stdio.h>

#include<dos.h>

#include<graphics.h>

int main()


{

int gd = DETECT, gm, i;

initgraph(&gd, &gm, "c:\\tc\\bgi");


for(i=0; i<30; i++)

{

setcolor(i);

ellipse(300,180,190,270,102,200);

ellipse(300,180,270,350,102,200);

ellipse(300,187,340,200,105,80);

ellipse(300,190,355,206,115,115);


// Lines on head sides (Brown)

line(398, 215, 403, 245); // Right side

line(202, 215, 197, 245); // Left side (ADDED MISSING LINE)


// Third Eye (Center Forehead)

ellipse(295,185,90,89,7,22);

circle(295,185,7);


// Left Eye & Eyebrow (Cyan)

ellipse(240,230,0,360,17,8);

circle(241,232,5);

arc(240,237,40,140,30);

arc(240,237,40,140,26);


// Right Eye & Eyebrow

ellipse(350,230,0,360,17,8);

circle(350,232,5);

arc(350,237,40,140,30);

arc(350,237,40,140,26);


// Lips & Mouth Details

ellipse(295,325,180,360,27,10);

ellipse(295,325,180,360,25,3);

arc(285,345,70,135,25);

arc(305,345,50,115,25);


// Nose

arc(220,270,340,40,60);

arc(363,275,130,200,60);

arc(280,292,180,300,5);

ellipse(285,295,0,360,5,2);

ellipse(297,295,0,360,5,2);

arc(302,292,232,0,5);


// Ears & Hair Locks

ellipse(236,385,275,70,15,42);

ellipse(363,385,110,270,15,42);

ellipse(185,423,293,358,55,12);

ellipse(414,422,200,232,55,12);

ellipse(201,245,70,330,5,10);

ellipse(400,245,230,110,5,10);

ellipse(201,315,90,260,30,60);


ellipse(211,315,110,238,20,60);

ellipse(160,303,300,20,50,100);

ellipse(200,433,110,235,30,50);

ellipse(155,333,330,20,70,80);

ellipse(145,333,330,20,70,80);

ellipse(145,373,330,0,70,120);

ellipse(135,370,318,0,70,120);


ellipse(218,385,240,70,20,42);

ellipse(400,315,280,100,30,60);

ellipse(400,315,280,100,15,60);

ellipse(410,305,140,268,20,70);

ellipse(406,417,270,84,20,40);

ellipse(392,345,140,288,20,50);


ellipse(405,325,130,288,25,50);

ellipse(410,421,145,286,30,50);

ellipse(420,421,140,268,20,50);

ellipse(385,390,120,263,25,40);


// Tripundra (Forehead Lines)

line(250,175,290,175);

line(250,185,288,185);

line(250,195,290,195);

line(300,175,340,175);

line(302,185,340,185);

line(300,195,340,195);


arc(250,180,90,270,5);

arc(250,190,90,270,5);

arc(340,180,270,90,5);

arc(340,190,270,90,5);


// Left Cobra / Snake Structure

ellipse(50,445,0,360,27,8);

ellipse(50,435,0,360,27,8);

ellipse(50,425,0,360,27,8);

ellipse(50,415,0,360,27,8);

ellipse(50,405,0,360,27,8);


ellipse(50,395,0,360,27,8);

ellipse(50,385,0,360,27,8);

ellipse(50,375,0,360,27,8);

ellipse(50,365,0,360,27,8);

ellipse(50,355,0,360,27,8);

ellipse(50,345,0,360,27,8);


ellipse(50,335,0,360,27,8);

ellipse(50,325,0,360,27,8);

ellipse(50,315,0,360,27,8);

ellipse(50,305,0,360,27,8);

ellipse(50,295,0,360,27,8);


ellipse(50,285,0,360,25,7);

ellipse(50,275,0,360,25,6);

ellipse(50,265,0,360,25,5);

ellipse(50,255,0,360,25,4);


ellipse(50,245,0,360,25,3);

ellipse(55,235,0,360,24,3);

ellipse(55,225,0,360,23,3);

ellipse(55,215,0,360,24,4);

ellipse(55,205,0,360,25,6);

ellipse(55,195,0,360,25,6);

ellipse(55,185,0,360,26,3);

ellipse(55,175,0,360,26,3);


ellipse(55,165,0,360,20,3);

ellipse(55,155,0,360,20,1);

ellipse(17,225,0,360,5,15);

ellipse(17,225,0,360,3,10);

ellipse(95,225,0,360,5,15);

ellipse(95,225,0,360,3,10);


// Red details on Snake Hood

setcolor(RED);

line(5,170,55,150);

line(5,171,55,151);

line(5,172,55,151);

line(5,173,55,151);

line(5,180,55,151);


line(5,181,55,151);

line(5,182,55,151);

line(5,183,55,151);

line(5,190,55,151);

line(5,191,55,151);

line(5,192,55,151);

line(5,193,55,151);


// Outer arcs around Snake

setcolor(i);

arc(90,230,110,220,90);

arc(100,250,170,220,100);

arc(20,230,315,70,90);

arc(10,250,315,10,100);


// --- TRIANGULAR JATA (HAIR BUN) ---

ellipse(300, 30, 0, 360, 10, 6);  // Top (narrowest)

ellipse(300, 36, 0, 360, 13, 6);

ellipse(300, 42, 0, 360, 16, 6);

ellipse(300, 48, 0, 360, 19, 6);

ellipse(300, 54, 0, 360, 22, 6);

ellipse(300, 60, 0, 360, 25, 6);

ellipse(300, 66, 0, 360, 28, 6);

ellipse(300, 72, 0, 360, 31, 6);

ellipse(300, 78, 0, 360, 34, 6);  // Bottom (widest)


// --- CRESCENT MOON (RIGHT OF JATA) ---

arc(380,60,120,240,30);

arc(383,58,120,240,30);

arc(386,56,120,240,30);

arc(389,54,120,240,30);


// --- TRISHUL (TRIDENT) ---

line(475,120,475,470);

line(478,120,478,470);

line(481,120,481,470);

line(484,120,484,470);

line(475,180,468,160);

line(484,180,492,160);

line(468,160,480,95);


line(492,160,480,95);

line(480,95,480,180);

line(435,200,525,200);

line(435,203,525,203);

line(435,206,525,206);


arc(454,177,120,230,30);

arc(450,177,120,245,30);

arc(445,177,120,250,30);


line(430,152,435,100);

line(433,152,438,95);

line(437,152,440,100);


arc(505,177,310,60,30);

arc(509,177,300,60,30);

arc(513,177,290,60,30);


line(522,152,517,100);

line(525,152,520,95);

line(528,152,523,100);


// Damru in Trishul Center

circle(480,320,20);

circle(480,320,18);

circle(480,320,16);


line(440,296,520,296);

line(440,298,520,298);

line(440,300,520,300);


line(435,318,460,318);

line(435,320,460,320);

line(435,322,460,322);


line(500,318,525,318);

line(500,320,525,320);

line(500,322,525,322);


line(440,340,520,340);

line(440,342,520,342);

line(440,344,520,344);


// Text

setcolor(YELLOW);

outtextxy(495,430,"HAR HAR MAHADEV");

outtextxy(485,450,"COMPUTER SOFT SKILLS");

delay(300);}


getch();

closegraph();

return 0;

}


Featured Post

Draw Lord Shiva (Bhole Ji) in C++ using Turbo C++ BGI Graphics Library

Draw Lord Shiva (Bhole Ji) in C++ using Turbo C++ BGI Graphics Library In this tutorial, you will learn how to program and draw a detailed f...

Popular Posts