Coding 8, Section 12 – Crowds

For 8th grade Science/Coding I am doing Pixar in a Box in Khan Academy.  Currently, I am doing the twelfth section in the course, crowds.

The twelfth section in Pixar in a Box has two parts: “Building Crowds” and “Counting Crowds.”

Part One

In this part of Crowds, I learned how artists at Pixar make crowds.  This part was based on Wall-E, a movie that came out in 2008.  If you have never watched Wall-E, it is about “a machine responsible for cleaning a waste-covered Earth meets another robot and falls in love with her. Together, they set out on a journey that will alter the fate of mankind.”

In the movie there are multiple scenes where there are crowds of robots.  For the animators, animating each and every individual robot will be tiring and tedious.  So the artists have to make multiple different robots, but make it easy for the animators.

This is where combinations come in handy.  If you have not learned about combinations in math yet, it is exactly what it sounds like.  It is combinations, in this case, of heads, bodies, and arms.  For example, if you have two heads and three bodies, you can make six different unique robots (2 x 6).

In this part I made different robots with combinations.  Here are some pictures of what I did:

Part Two

Part two, is all about the math behind combinations.  In the first exercise I learned a formula to find possible robot combinations for a robot with two heads, one body, and one set of arms.

R stands for the number of robots you can make.

B stands for the number of bodies you can use.

A stands for the number of arms you can use.

H stands for the number of heads you can use.

r = h * (h – 1) * b * a

In the second exercise I learned how many possible combinations there can be for a snake.

I also learned a new formula, the binomial coeffient. 

Say that you want a cast of 3 robots, and you have 6 different robots to pick from. 

You would write 6 * 5* 4/ 3! or 6 * 5 *4/ 3 * 2 * 1

The exclamation mark after 3 is known as a factorial (in case you did not know). 

Another way to write this is 6!/3!

That is known as the binomial coefficient, which can also be written like this:

n stands for the number of actors, in this case robots you can choose from.

k stands for the size of the cast, which is 3 in my example.

That is all for this section!  My next essay will be about Section 13 of Pixar in a Box on Khan Academy, Sets and Staging.  Thanks for reading!

Personal Finance 8, Lesson 80 – My Business Type

In the last essay I wrote I picked my business (writing stories and posting them on Kindle) and laid out my business plan.  In this essay I am going to talk about the type of business that will be good for my business.

This week I learnt about different types of businesses, and I have decided that having a sole proprietorship is the best business type for me.  Since I am planning on writing short stories or novels I do not need a partnership, and forming an LLC for something this simple seems absurd.  Using a sole proprietorship will make me responsible for liabilities, but it also means I get all of the profits.  It also does not require me to register with the state, or the government in my case (I live in Singapore, which is too small to have states).

As you can see, my business is very simple and does not require me to start an LLC or a partnership.  As fun as it would be to have a partnership with a friend, I doubt we will get any work done.  It is also much easier to do a sole proprietorship because I will not be required to register as a business.

Thanks for reading!

Coding 8, Section 11 – Character Modeling

For 8th grade Science/Coding I am doing Pixar in a Box in Khan Academy.  Currently, I am doing the eleventh section in the course, animation.

The eleventh section in Pixar in a Box has two parts: “Modeling with Subdivision Surfaces” and “Mathematics of Subdivision.”

Part One

Subdivisions.  What are they?  Subdivisions are mathematical formulas, and at Pixar they are used to construct the characters in each film.  Subdivisions are much more expressive compared to parabolas, which is why they are used instead of parabolas.

This is what a subdivision looks like.  There are commands that let you make the blue dots, this is called splitting.  And when you split, you can average the points, which makes the shape rounded.  You can control the shape by using the four points, A, B, C, and D.  Splitting and averaging, in technical terms, is known as subdividing.  

In the third exercise, I was able to work with subdivisions.  I could add points and make the shape smooth.  This gave me a feel of what Pixar artists do to make characters for their films.

Before:

After.  This is my best attempt at making a hand:

In exercise four, I learned how to subdivide with 3D shapes!  I was able to work with a cube, a ring, and a hand.  This is one of my favorite exercises!  I can almost imagine Pixar artists doing this everyday as work.

Part Two

Part two was all about the math behind modeling.  I learned about weights, weights are how far the object moves when you subdivide.  For one of the exercises I was able to play around with the weights to see what happens when I use certain weights.  I learned that when you have three weights and you use negative and positive numbers you create a fractal.

This is what a fractal looks like after you subdivide:

That is all for this essay!  My next essay will be on the 12th Section of Pixar in a Box on Khan Academy, Crowds. 

Thanks for reading!

English 8, Lesson 76 – Are Famous People Better Role Models than Normal People?

Are famous people better role models than normal people?  I personally think that famous people do not make a better role model.  I think that anyone can be a good role model as long as they have a good moral compass.

I feel that famous people do not make a better role model because fame comes with problems, like money and stress.  Money can corrupt a person and stress can make a person turn to drugs or alcohol.  These are things that many celebrities have to deal with, which may not be a good influence for people, specifically easily influenced teenagers.  Yes, not all famous people have to deal with these struggles, but it is still a problem.  Many young children think that it is cool to get drunk or smoke because it is what their role models do (the media also makes it cool, but that is a different subject).

Celebrities can be good role models, but they are not better role models than normal people.  This does not mean that you should not have any famous role models.  It only means that you have to be careful who you idolize.

Thanks for reading!

History 8, Chinese History – The Late Qing

In this essay I am going to write a summary of the Later Qing Dynasty, 1839 – 1911.  I wrote an essay about the Early Qing Dynasty, if you would like to check it out.  This essay is based on the fifth chapter of the book, “History of China” by J.A.G. Roberts, Third Edition, 2011.

The First Opium War (1839 – 1842)

During the early 18th century the British and Chinese would trade tea for woolen and metal goods.  This arrangement seemed to work for both sides, until the 1760s.  China was exporting more than importing.  To fix this problem the British started the Commutation Act in 1784.  It lessened the tax on tea.  This was also an attempt to stop the tea smuggling and the trade of Indian opium for Chinese tea, which would be shipped to England.

The Chinese court allowed foreign trade, but did not fully trust the Westerners, and confined all foreign trade and traders to Guangzhou (a city in the Guangdong province). “Foreign traders were subject to the Eight Regulations which defined the conditions of their residence in Guangzhou.”[i]  The Eight Regulations also include the rule of no foreign women or guns allowed into the city, and the traders themselves were only allowed to stay during trading seasons.

The British complied with the regulations, and their relationship with the Chinese was doing well until 1784.  A British merchant accidently killed two Chinese men while firing a salute.  The Chinese demanded that the gunner of the ship should be handed over.  The British reluctantly gave the gunner to the Chinese, who was immediately strangled.   This incident resulted in the McCartney embassy, one of Britain’s earls.  He was sent to China with the request to open other trading ports outside of Guangzhou to the foreigners.  The Qianlong emperor refused to open other ports and turned McCartney away.

After the Napoleonic Wars (1803 – 1815), Britain had proved that they were the world’s new super power.  Several incidents around this time sparked tension between China and Britain.  Britain sent a second embassy to China in 1816, asking once again to open trading port outside of Guangzhou.  Once again, they were rejected.  Also around this time opium smuggling escalated because of how cheap it was.  The people’s addiction became apparent to the government.  Ruan Yuan, a governor-general of Guangdong and Guangxi, drove all of the smugglers in his provinces to Aomen (a special administrative region of China).  This resulted in the trade of opium evolving around the coast.

Lord Palmerston, the British Foreign Secretary, made Lord Napier superintendent of trade in China and ordered him to open a direct communication with the authorities in Guangzhou.  Napier followed the order, but went to Guangzhou without permission from the emperor.  Because of this he was not allowed into the city and was turned away under humiliating circumstances.

In 1838, Lin Zexu, the governor-general of the Hubei and Hunan provinces, was ordered to stop opium smuggling in Guangzhou.  His solution was to keep all foreign traders under house arrest and make them sign a declaration that stated they could hand over all of their opium or be executed.  Charles Elliot, the new superintendent of British trade, told all of the traders to sign and hand over their opium, which they would be compensated for.

When Palmerston found out about the whole incident he sent Willian Jardine and other merchants to China demanding they open other trade ports and compensate the foreign traders for their opium.  This started the First Opium War.

Charles Elliot defeated the blockade at Guangzhou and moved north to Tianjin and Beijing.  Henry Pottinger captured the cities of Xiamen, Zhousan, and Ningbo (all cities).  Realizing that they were stuck, the Jiaqing emperor signed the Treaty of Nanjing (1942), which opened the trading ports of Xiamen, Fuzhou, Ningbo, and Shanghai.  China also paid Britain $21,000,000 to make up for the costs of war and opium they took from the British traders.

The First Opium War to the Arrow War (1856 – 1860)

The British and China started to dislike their treaty almost immediately.  The British wanted the opening of ports to increase trade, but this did not happen.  The British wanted to know if their citizens had the right to trade and live within the wall of Guangzhou, and if they did, when would the Chinese allow them to use these rights.

In 1847, John Francis Davis (a British governor on China’s coast), ordered the capture of the forts guarding Guangzhou.  Qiying (a Manchu statesman), had “to promise entry into the city in two years’ time.”[ii]

After the treaty signing in 1842 the Chinese were somewhat willing to work with the British.  The Manchus would do anything to preserve their dynasty, even if it was “at the expense of the Chinese national interest.”[iii]    In 1848, the emperor dismissed Qiying and appointed Xu Guangjin as the new governor-general of Guangdong and Guangxi.

The British were supposed to be allowed into Guangzhou on April 1849, but Xu Guangjin was able to hold them off by putting militia to guard Guangzhou and forged an imperial edict.  The Qing saw this as a victory and Xu Guangjin and Ye Mingchen (governor of Guangdong), were given imperial honors.

This incident might have led to the war in the 1850s, but China had other problems.  The Taiping rebellion captured Nanjing in 1853, and the Red Turban rebellion overran Guangdong in 1854.

In 1856 the Chinese boarded a British ship under the suspicion of piracy. Sir John Bowring (the British governor of Xianggang) heard this news and sanctioned a naval attack on Guangzhou.  China began giving rewards to the people if they killed or captured an Englishman, and burnt down factories and foreign living quarters.  When Lord Palmerston, now the Prime Minister, heard he ordered the Earl of Elgin to attack China.

After sending help to India to suppress the Indian Mutiny, the Earl captured Guangzhou and sent Ye Mingchen as a prisoner to India.  He then moved north and seized the Dagu forts and reached Tianjin.  This is when the emperor finally agreed to negotiate a peace in June 1858.  China had to agree to open ten more ports for traders and missionaries to travel into interior China.  They also agreed to “accept changes regarding the external tariffs and new government transit duties; to legalize opium trade; and to accept a resident British minister in Beijing.”[iv]  Also around this time, China had to sign other treaties with France, Russia, and America, since all were becoming more interested in the pacific and the Chinese land.

When the British came back in June 1859 to confirm the treaty, they were met with force and suffered many casualties.  When they came back a second time they brought forces of their own and burnt down the Summer Palace (a collection of buildings designed by the Jesuits) and marched on Beijing.

The Rebellions

From 1850 – 1873, the Qing had to deal with many rebellions, some almost overthrew them.  The Taiping rebellion (1850 – 1864), the Nian rebellion (1853 – 1868), Muslim threats in Yunnan (1856 – 1873), and the Gansu rebellion which lasted from 1862 – 1873 (Gansu is a province), a secret society capturing Shanghai and Xiamenn in 1853, and the Red Turbans almost capturing Guangzhou in 1854.  In 1854 and 1873, the Miao (an ethnic group that lives in Guizhou), revolted and Yakub Beg (a Uighur from present-day Uzbekistan), ruled over a large part of western Xinjiang (an autonomous region of China).  As you can see, China had a lot of rebellions and problems to fix while dealing with the Westerners.

One of the biggest rebellions the Qing faced was the Taiping rebellion, which ended the dynasty in 1911.  The Taiping rebellion started from one man’s dream, quite literally.  Hong Xiuqan, Hakka Chinese from Huaxian in Guangdong.  Xiuqan kept failing his examinations, while he was taking it one day a Christian missionary gave him a pamphlet about God and the Bible.  Xiuqan had a dream that he was God’s Chinese son, and started his own religion, which eventually resulted in the Taiping rebellion.

Xiuqan started to become more religious and converted his family and people in his village in the late 1840s.  By April 1852 the Taiping religion had gathered a following of over a million people.  In March 1853 they captured Nanjing and made it their capital.  After a seven-year impasse, the rebellions managed to occupy middle Yangzi.  They were so strong that the government could not defeat them.

In 1860 the Qing tried to recapture Nanjing from the Taiping but failed.  The emperor recruited Zeng Guofan, a scholar-official, to start a new army.  Zeng stated a stronger and better army known as the Hunan army.  In 1862, Li Hongzhang, a former assistant of Zeng, started the Anhui or Huai army, it was based off of Zeng’s Hunan army, but it focused on Western weapons and tactics.

In 1856 the Taiping had a “power struggle, which resulted in the death of the Eastern King (one of their leaders).”[v]  Hong Ren’gan, Xiuqan’s cousin, unified the rebellion and almost captured Shanghai in 1862.  But the rebels lost control of Nanjing and it was reclaimed by the government in 1864.

There was also the Nian rebellion which rose to power in 1851 from the Huai River.  A Mongol general, Senggelinqin was ordered to end the rebellion.  By spring 1863 Senggelinqin had weakened the Nian so much they were almost defeated, but the Nian learned to adapt and ambushed and killed Senggelinqin in 1865.

In the north-west the Muslim rebellion was defeated in 1873, as was the Miao uprising, and the threat of Yakub Beg ended after his death in 1877.

After the Rebellions

American forces started to take interest in Asia and forced Japan to open their ports.  Japan, unlike the Chinese was “able to adapt rapidly to match the power of the West and soon establishes itself as a competitor with the Western powers for colonial rights in Asia.”[vi]

Japan also engaged in a war with China over who controls Korea, and won.  This was the first time China, the supposed “supreme power”[vii] of Asia, was beaten by a “tribute bearing subordinate”[viii], like Japan.  This war was known as the Sino-Japanese War (1894 – 1895).

The 100 Days’ Reform, 1898

After their defeat in the Sino-Japanese war, the Qing decided to conduct a national 103 day reform on political, educational, and cultural aspects.  This was led by the Guangxu Emperor.  The reform lasted from the 11th of June to the 22nd September. 

The traditional examination system and sinecures (jobs that require pay but do not do anything) was abolished.  Peking University was established, as was agricultural schools in all provinces.  The standard education system was modernized (focusing on math and science instead of Confucian texts), and encouraged students and families to study abroad.  The government was changed from absolute monarchy to constitutional monarchy, and applied capitalism to strengthen their economy.  Modernized their military and started to use modern training and drill methods.  Started naval academies, repurposed unused military lands for farming, and established a bureau for railways and mines.

Many did not like how drastic these changes were and wanted to have less extreme reforms.  The Guangxu emperor was put under house arrest until his death in 1905, which is when the Empress Dowager Cixi took over.  Cixi kept most of Guangxu’s reforms, but the people thought the only way to save their dynasty was the overthrow it, which they did six years later.

The Boxer Uprising

In September 1899 an uprising, supposed to be descended from the White Lotus, emerged in in Beijing.  The Boxer rebellion was founded to oppose the Christian converts and missionaries coming from the West.  In the beginning, government officials tried to be neutral to the fights between the Boxers and the Christians, but I was obvious they favored the Boxers.  The Boxers were mainly in Beijing and Tianjin.

By May 1900, Boxers would be on the streets, and in June 1900 they cut Western railway lines.  “In retaliation, the Western powers seized the Dagu forts.”[ix]

On June 21, the Empress Dowager (the effective ruler at the time), declared war against the Westerners, blaming them for provoking the people into started a rebellion.  “The foreign population in Beijing were besieged and guarded by taskforces for 55 days.”[x]  The siege was lifted on August 14 because of a relief expedition.

The rebellion ended in 1901, China made an agreement with the Eight-Nation Alliance (included Germany, Japan, Russia, Britain, France, America, Italy, and Austria-Hungary), which was known as the Boxer Protocol.  The Chinese government was forced to apologize to the foreign population and the Eight-Nation Alliance.  The Chinese officials who were openly supporting the Boxers were executed, banished, or ordered to commit suicide.  The Chinese would also have to pay 450 million taels to the Eight-Nation Alliance in installments for 39 years. 

The Late Qing Reforms

After the Boxer Rebellion the Empress Dowager started reforming the country, starting with the schools.  Each district was required to have primary and middle schools.  Western subjects would be taught alongside the traditional Chinese curriculum.  The Eight-Legged essay, which was used in exams, was abolished, and schools started encouraging students to study abroad.

The Qing also improved their army.  They abolished the exams to join the army and started a national army.  They also changed their way of viewing foreign merchants.  Instead of invaders, they were partners.  The Qing also started to get into the building of railways.

Conclusion

Many Western historians have said that the reforms after the Boxer Rebellion was the Qing’s last attempt to stay alive, and they may have been right.  The Qing fell in 1911 to the Taiping Rebellion, which was thought to have been defeated.  It is a shame the dynasty was overrun when they finally started to be more accepting towards the foreigners instead of treating them as enemies. 

Thanks for reading!


[i] A History of China, J. A. G. Roberts Page 163

[ii] A History of China, J. A. G. Roberts                 Page 167

[iii] A History of China, J. A. G. Roberts                Page 168

[iv] A History of China, J. A. G. Roberts                Page 169

[v] A History of China, J. A. G. Roberts                 Page 175

[vi] http://afe.easia.columbia.edu/main_pop/kpct/kp_imperialism.htm

[vii] http://afe.easia.columbia.edu/main_pop/kpct/kp_imperialism.htm

[viii] http://afe.easia.columbia.edu/main_pop/kpct/kp_imperialism.htm

[ix] A History of China, J. A. G. Roberts                 Page 201

[x] A History of China, J. A. G. Robert                   Page 201

Personal Finance 8, Lesson 75 – My Business Plan

A couple weeks ago I wrote an essay about possible business ideas that I could do.  I have now decided on a business idea, book writing.  Yes, you read it right.  I want to be an author, and I already have it all figured out into four parts: the idea, the publishing, the marketing, and the money (sales).

The Idea

When I think of my book and the process of writing and publishing it, I think of it in three steps.

Step one: develop the plot and write the book. 

Step two: self-publish the book on Amazon. 

Step three: market the book on Instagram, TikTok, Facebook, etc…

My book is about three siblings who were taken by the government as children and used for testing, which resulted in their special abilities based on their emotions.  When the three teens escape they struggle to wade through the troubles of high school and being a teen while keeping their powers a secret.  But what will happen to them if and when the government finds them again?

The Publishing (need info)

Once I finish writing my book, I need to publish it.  Now that everything is online, it is possible for me self-publish my book and I plan to publish my book on Amazon Kindle.

The Money (Sales)

When I finally publish my book, I will need to take into consideration of how I am going to price it.  Most books, if not all books on the Kindle app are $1 or less.  I will price my book at $1 (Singapore Dollars), and Amazon takes 30% of my profit.  So I will get 70 cents for each copy I sell.

Then there are the calculations, which I have already figured out. 

If I get a minimum following of 1k people, and if about 50 –100 people buy my book, I would make minimum $35.

These are just estimations.  It is just so I can get an idea of what I might earn if this goes the way I hope it will.

The Marketing

When I finish publishing my book, I need to market it.  I am thinking of using TikTok or YouTube or Instagram as a way to market my book.  I know of other teenagers around my age that used TikTok to market their self-published book and were successful.  Some were able to make their own physical copy as well.

But if social media does not work, I have other ways to market my book.  I can advertise my book on my blog, on Facebook there are author groups who will promote your book, and Kboards, where other you can talk to other authors and market your book.

Conclusion

This is my business plan, simple and short, but to the point.  I have already laid out a plan, now all I have to do is put it into action. Would you do this business plan?  Or would you have a different approach?

Thanks for reading!

Coding 8, Section 10 Environment Modeling

For 8th grade Science/Coding I am doing Pixar in a Box in Khan Academy.  Currently, I am doing the tenth section in the course, animation.

The tenth section in Pixar in a Box has two parts: “Modeling Grass with Parabolas” and “Calculating Parabolas.”

Part One

The first exercise I did was labeled “String Art”.  In the video lesson before the exercise, it explained that when making blades of grass for a movie, they use Parabolas.  There is a lot of math behind this, but that will be in part two. 

A more art friendly version of Parabolas are string art like this:

The green in the picture above is what the blade of grass would look like.

In the second exercise, I learned how the find the coordinate of a point between two points. 

In a line segment, the middle point is ‘Q’, and the two end points are ‘A’ and ‘B’, you have to find the coordinates for ‘Q’.  The formula for this is Q = A/2 + B/ 2.

The third exercise was quite simple.  I was given a blue and green curve, and it was my job to move the blue curve right above the green curve.

Before:

After:

For the fourth exercise, I was able to make my own blade of grass!  I was able to control the width, color, and angle of the blade of grass.

For the fifth exercise I animated multiple blades of grass.

Part Two

In the first part I learnt about the art in environment modeling, in the second part I am learning about the math behind the art!

Imagine there is a line with points A and B at the end.  In the middle, there is M.  But in this case, M is not in the middle of the line, but favoring B. Like this:

The formula for this line is (1 – t) A +tB

T stands for the distance between each point on the line.

In the second and third exercises I had to calculate the touching point.  But what is a touching point?

The point P on the picture above is the touching point.  The formulas in the picture are how to calculate P.

That is all I have learned in the 10th section of Environment Modeling.  My next essay will be about Section 11, Character Modeling.

Personal Finance 8, Lesson 70 – Bishop Curry

Bishop Curry, the 12 year old boy who is working to save babies from death by an overheating car.

In 2018 Bishop Curry was only 10 years old when he heard on the news that a 6 month old baby had died because she was left in the car on a hot day.  Bishop knew the family and his younger sister was around the same age.  This gave him the idea to build a device to stop this horrible incident from happening again.

Before this incident, Bishop was already an inventor making home-made catapults, ping pong rocket launchers, and ways to melt snow without salt.

Bishop decided to build a car seat or car seat cover that would detect if a baby was in the car and if it was getting too hot.  The machine, called Oasis, is ingenious.  Oasis has built in sensors to check if there was actually a baby or an inanimate object, like a purse.  Oasis can track the car’s GPS, if it was moving that meant someone was in the car, which means the baby is fine.  But if the GPS stops moving Oasis starts a two minute timer.  After two minutes Oasis will start blowing cool air onto the baby and send a text message to the parent.  If there is no response after the text message, Oasis will text 911 the coordinates of the car.  Removing the baby from the car seat will reset and stop Oasis.

The invention itself is ingenious, but the meaning behind the name is even more creative.  Bishop said that: “I call it Oasis, because an oasis is cool. When I look at an oasis it makes me think of relief.”[i]

Oasis costs over $20,000 to make, but thanks for a website called GoFundMe, people around the world are donating money to Bishop’s cause to stop infant death in hot cars.

Bishop Curry is an amazing example that you should never let your age stop you from doing something.  Even though Bishop is still working on a prototype, he is getting closer and closer to his goal.

Thanks for reading!


[i] Talbott, David. “A Lesson in Innovation: Bishop Curry and Oasis.” Mouser Electronics. 9 August 2019. Web. 6 November 2020  https://www.mouser.com/blog/lesson-innovation-bishop-curry-oasis#:~:text=Bishop%20Curry%20Discusses%20His%20Invention&text=When%20I%20look%20at%20an,Bishop%20demonstrated%20Oasis’%20essential%20functions.&text=The%20device%2C%20which%20is%20mounted,the%20presence%20of%20a%20baby

English 8, Lesson 70 – The Life Cycle of a Butterfly

For the past two weeks I have been researching butterflies and their life cycle.  But not just any butterfly, the beautiful Blue Morpho butterfly, or the Morpho peleides Kollar

Eggs

When a mother butterfly is “pregnant”, she must find a leaf to lay her eggs on.  But it cannot be any regular leaf, it has to be a certain type.  Eggs are usually laid on leafs that the larva can eat, but the eggs can also be found in tree bark or flowers.  When the eggs hatch into caterpillars, they cannot move and must eat the leaf they were born on.  For the Blue Morpho, the mother butterfly would lay her eggs on leafs from the pea family.  Some types of butterflies lay their eggs one at a time, while others, like the Blue Morpho, lay in clusters.  Some even lay their eggs a hundred at a time!  The butterflies stay in the eggs for about 3-7 days before hatching into larvae.

All butterfly eggs look different.  The picture below is a cluster of Blue Morpho eggs:

Larva

When the egg hatches, larvae, or caterpillars come out.  The larvae usually stay this way from two weeks, to a month.  During this time all they do is eat.  They usually eat the leaf they were hatched on, but when they are newly born they eat their own eggs.  Some types of caterpillars are carnivores, but most are herbivores.  The more the caterpillar eats the bigger it gets, and the tighter their exoskeleton becomes.  When the larva get big enough they find a safe space where they cannot be disturbed, and encloses itself in a silky cocoon.

The Morpho butterfly stays as a larva for about eight weeks, and is green with brown hairy splotches:

Pupa

When the larva has eaten enough it will go into the third stage of metamorphosis, the pupa form, or when it is in its cocoon.  The butterfly stays this way from a few days to many months.  Some types of butterflies stay in their cocoon for all of winter, and only come out in the spring, unlike the Morpho butterfly, who stays in its cocoon for two weeks.

This is a picture of the Morpho butterfly in its cocoon:

Adulthood

The final stage of metamorphosis, is adulthood, its final form, an actual butterfly.  This happens when the pupa “hatches.”  When the butterfly comes out of the pupa their wings are wet and their abdomen has fluid in it.  They pump some of this fluid into their wings to inflate themselves.  Now the butterfly can only drink liquids out of their tube like mouth, known as a proboscis.  The Morpho butterfly stays as an adult butterfly for only two or three weeks before its death.

Here is a picture of the Morpho butterfly in its final form:

All pictures came from https://www.butterflyidentification.com/blue-morpho.htm

The life cycle of a butterfly is one of the most amazing things that nature has produced.  It is a shame that these beautiful creatures only live for a few months.

Thanks for reading!

Coding 8, Section 9 Animation

For 8th grade Science/Coding I am doing Pixar in a Box in Khan Academy.  Currently, I am doing the ninth section in the course, animation.

The ninth section in Pixar in a Box has two parts: “Introduction to Animation” and “Mathematics of Animation Curves.”

Part One

In the first exercise I animated a ball across the screen.  You press the frame you want and drag the ball to the position you want.  The animation looks really cool, but it is not very natural and looks jerky.

In the second exercise I could only animate the ball up and down.  I was not able to move it around the screen.  The animation looks really cool, but it is still jerky and you can tell it is animated.

In the third exercise I learned about Bezier curves.  Bezier curves make it easy to ease the animation into its next position.  The purple curves that you see below are known as splines, they make curves which eases the yellow dots (the positions we want our animation to go to) into a nice curve.  This makes the animation smooth and natural.

It may look messy, but the animation is a lot smoother and natural compared to the two earlier animations.

In the fourth exercise I learned about avars.  Avars is short for animation variables.  In this exercise I learned how to squish and stretch the ball to make it look more natural while it is bouncing.  ‘S’ stands for scale, and ‘Y’ stands for its height on the screen.  ‘S’ and ‘Y’ are examples of avars.

The last exercise in the first part of the Animation section was making my own animation. 

Here is the link to my animation:

https://www.khanacademy.org/computer-programming/animation-last-exercise-animating-the-ball-with-x-y-scale-and-rotation/4837905338679296

Part Two

Part two of animation is all about learning the math behind the cool animations.

In part two I learned about was linear interpolation.  Linear interpolation is “a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points.”[i]

In the first exercise I had to solve the x position of a certain frame using the linear interpolation formula:

x coordinate – x coordinate, divided by, frame – frame.


Let’s plug in the numbers, and maybe the formula will make more sense.  In this case the equation would look like:

30-18, divided by, 14-4 = 1.2

Now, to find the x-coordinate in frame 7, I add 1.2 from frame 4 (because it is the first frame that has a given x-coordinate) to frame 7.

The x-coordinate in frame 7 is 21.6

When the line is sloping down instead of up, the answer to the formula would be negative, which means the x-coordinate decreases. 

I also learned about De Casteljau’s Algorithm, which is ways you can make shapes or curves with more than two points. In the picture below you can see little grey dots.  Those are connecting and forming the curve.

This was all I learned in Section 9: Animation.  The next section I am going to do is Environment Modeling.  Thanks for reading!

[i] https://en.wikipedia.org/wiki/Linear_interpolation

Design a site like this with WordPress.com
Get started