To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

File:ConvexCombination-2D.gif

From Wikipedia, the free encyclopedia

Original file(1,000 × 1,000 pixels, file size: 331 KB, MIME type: image/gif, looped, 92 frames, 0.9 s)

Summary

Description

Convex combination of three points in a two dimensional vector space as shown in animation with , . When P is inside of the triangle . Otherwise, when P is outside of the triangle, at least one of the is negative.

Code can be found at here.
Date
Source Own work
Author Damodar Rajbhandari

Source code in Python 3.x (in Jupyter Notebook)

# Damodar Rajbhandari (2022)

import matplotlib
matplotlib.rcParams['text.usetex'] = True # uncomment if you donot have latex installed

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import rc
from IPython.display import Image

rc('animation', html='html5')
plt.rcParams.update({'font.size': 13})

# animate point P = alpha0 * v0 + alpha1 * v1 + alpha2 * v2
fig = plt.figure(figsize=(10, 10))
fig.tight_layout()
pls = []
x = [2, 4, 12]
y = [1,7, 6]
plt.plot(x, y, 'o', color='black')
# plot dots with labels v0, v1, v2
for i in range(3):
    plt.text(x[i]-.37, y[i]+.1, '$v_'+str(i)+'$')

plt.text(1.5, 8, '$P := \\alpha^0 v_0 + \\alpha^1 v_1 + \\alpha^2 v_2$')
plt.fill(x, y, color='green', alpha=0.3)
plt.xlim(0, 15)
plt.ylim(0, 9)
for alpha1 in np.arange(-0.1, 1.2, 0.1):
    for alpha2 in np.arange(-0.2, 1, 0.1):
        alpha3 = 1 - alpha1 - alpha2
        if alpha3 >= 0:
            x = alpha1 * 2 + alpha2 * 4 + alpha3 * 12
            y = alpha1 * 1 + alpha2 * 7 + alpha3 * 6
            pl, = plt.plot(x, y, 'o', color='red')
            npl = plt.text(x-.35, y+.1, 'P')
            a1 = plt.text(1.5, 8.5, '$\\alpha^0$ = '+str(round(alpha1, 2)))
            a2 = plt.text(4.5, 8.5, '$\\alpha^1$ = '+str(round(alpha2, 2)))
            a3 = plt.text(7.5, 8.5, '$\\alpha^2$ = '+str(round(alpha3, 2)))
            a1a2a3 = plt.text(10.5, 8.5, '$\\alpha^0 + \\alpha^1 + \\alpha^2$ = '+str(round(alpha1+alpha2+alpha3, 2)))
            myp = plt.text(5.3, 8, '$ = '+str(round(alpha1, 2))+r'\left(\begin{array}{c} 2 \\ 1 \end{array}\right) + '+str(round(alpha2, 2))+r'\left(\begin{array}{c} 4 \\ 7 \end{array}\right) + '+str(round(alpha3, 2))+r'\left(\begin{array}{c} 12 \\ 6 \end{array}\right) = '+r'\left(\begin{array}{c}'+str(round(x, 2))+r'\\'+str(round(y, 2))+r'\end{array}\right)$')
            pls.append([pl, npl, a1, a2, a3, a1a2a3, myp])

# make a trace dashes line of previous points
for i in range(len(pls)-1):
    plt.plot([pls[i][0].get_xdata()[0], pls[i+1][0].get_xdata()[0]], [pls[i][0].get_ydata()[0], pls[i+1][0].get_ydata()[0]], '--', color='red')

# create the animation
ani = animation.ArtistAnimation(fig, pls, interval=50, blit=True)
ani.save('convex-combination.gif', writer='imagemagick', fps=70)

with open('convex-combination.gif','rb') as f:
    display(Image(data=f.read(), format='png'))

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Convex combination of 2-simplex

Items portrayed in this file

depicts

11 December 2022

image/gif

f26eeeabd5187e3c32e646d0c1421e495bc9aa0f

339,251 byte

0.9200000000000006 second

1,000 pixel

1,000 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current02:01, 11 December 2022Thumbnail for version as of 02:01, 11 December 20221,000 × 1,000 (331 KB)Drherebetter quality animation using python and LaTeX
04:51, 3 August 2022Thumbnail for version as of 04:51, 3 August 2022640 × 594 (25.67 MB)Panchotera~enwikiIncreased size
03:47, 3 August 2022Thumbnail for version as of 03:47, 3 August 2022320 × 297 (15.61 MB)Panchotera~enwikiUploaded while editing "Convex combination" on en.wikipedia.org
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Metadata

Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.