Friday, February 28, 2025
Thursday, February 27, 2025
Thursday, November 28, 2024
Price range of different flats and apartments in Phase 7 and 8 in Bahria Town, Rawalpindi/Islamabad
Bahria Town is one of the most well-known areas in Rawalpindi/Islamabad.
It may have several investment options. Considering flats in the area of Phase
7 and Phase 8, they can be of different types, including Studio apartments, 1
Bed, 2 Bed, and 3 Bed flats.
Studio flats are one bed flats with a room and attached bathroom.
One bed flat has one bedroom with attached bathroom and TV launch and balcony. Two
bed means two bedrooms with TV launch attached. Three bed means three bedrooms
with TV launch attached and washroom with bedrooms.
Considering cash payments, Studio apartments are available
in the price range of 25 lacs to 50 lacs depending on the location, floor,
building, availability of lift, beauty, and furnished or non-furnished. These apartments
after purchase can also be set on Airbnb. The rent of these apartments can be
over 20,000. One bed flats are available in the price range of 35 lacs to 150
lacs. The rent of these apartments can be over 35,000. Two bed flats are
available in the price range of 45 lacs to 200 lacs. The rent of these apartments
can be over 50,000. Three bed flats are available in the price range of 75 lacs
to 300 lacs. The rent of these apartments can be over 75,000. There is about
20% ROI on these investments.
Source:
Property Naama - Flats In Bahria Town Rawalpindi | 25 Lac
Say 2 Crore Tak | 1, 2 & 3 Bedroom Ready & Installments - https://www.youtube.com/watch?v=qyKG8x8z51o
Wednesday, November 27, 2024
Day 12 and Last Day: 30-days to learn rgl, plotly, and gganimate - Create a Time-Based 3D Animation Using rgl and gganimate
N.B.: This is the last of learning a combination of rgl, plotly, and gganimate, as it becomes difficult to combine all these at this time.
Step 1: Install Required Packages
Before starting, ensure the following packages are installed:
install.packages
(c("rgl",
"ggplot2",
"gganimate",
"ggimage"))
Step 2: Generate 3D Frames Using rgl
1. Setup the Environment: Create a 3D scatter plot
that rotates over time.
library
(rgl
)
# Create a 3D scatter plot
n
<- 100
# Number of points
x
<- rnorm
(n
)
y
<- rnorm
(n
)
z
<- rnorm
(n
)
col
<- rainbow
(n
)
open3d
()
# Initialize the 3D plot
plot3d
(x
, y
, z
, col
= col
, size
=
5)
2. Rotate and Save Frames: Capture frames by
rotating the plot over time and saving each frame as an image.
frames_dir
<-
"frames"
dir.create
(frames_dir
, showWarnings
=
FALSE)
# Create a directory for frames
# Generate and save frames
for
(i
in
1:100)
{
view3d
(userMatrix
= rotationMatrix
(pi
* i
/
50,
0,
1,
0))
# Rotate around Y-axis
snapshot3d
(file.path
(frames_dir
, paste0
("frame_", sprintf
("%03d", i
),
".png")))
}
Step 3: Animate Frames Using gganimate
1. Prepare Frame Data: Load the saved frames and
prepare a data frame for animation.
library
(ggplot2
)
library
(gganimate
)
library
(ggimage
)
# List saved frames
frame_paths
<- list.files
(frames_dir
, full.names
=
TRUE)
# Create a data frame
frame_df
<- data.frame
(
frame
= frame_paths
,
time
=
1:length(frame_paths
),
# Time points for animation
x
=
0,
# Placeholder for x-coordinate
y
=
0
# Placeholder for y-coordinate
)
2. Build the Animation: Use gganimate
to create the animation from
the frames.
animation
<- ggplot
(frame_df
, aes
(x
= x
, y
= y
, image
= frame
))
+
geom_image
(size
=
1)
+
# Add images to the plot
transition_time
(time
)
+
# Transition over the time variable
enter_fade
()
+
# Fade-in effect
exit_fade
()
+
# Fade-out effect
theme_void
()
# Remove unnecessary plot elements
3. Save the Animation: Export the animation as a
GIF.
anim_save
("3d_time_animation.gif", animation
)
Step 4: Review and Debug
- Check the
saved animation in your working directory (
3d_time_animation.gif
). - If the
animation doesn’t look smooth, adjust the number of frames or transition
settings.
Key Notes
- Custom Rotation: You can modify the
view3d()
function to rotate around different axes or add zoom effects. - Image Quality: Ensure the
rgl
frames are saved with high resolution for better animation quality. - Animation Effects: Experiment with different
gganimate
effects likeease_aes()
or transitions (transition_states()
).
-
Q: What do you know about ergot alkaloids? Ans: These include alkaloids which we get from the ergot fungus Claviceps purpurea or derived ...
-
(For detailed study of Pharmaceutical Incompatibility Click here) Multiple Choice Questions (MCQs) from Pharmaceutical Incompatibility in ...
-
Introduction: Incompatibility refers to the inability of something or some process to co-exist with another process or thing. So, Pharmace...