File:Cubic graph special points repeated.svg
From WikiProjectMed
Jump to navigation
Jump to search
![File:Cubic graph special points repeated.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Cubic_graph_special_points_repeated.svg/512px-Cubic_graph_special_points_repeated.svg.png)
Size of this PNG preview of this SVG file: 512 × 512 pixels. Other resolutions: 240 × 240 pixels | 480 × 480 pixels | 768 × 768 pixels | 1,024 × 1,024 pixels | 2,048 × 2,048 pixels.
Original file (SVG file, nominally 512 × 512 pixels, file size: 7 KB)
This file is from a shared repository and may be used by other projects. The description on its file description page there is shown below.
Summary
DescriptionCubic graph special points repeated.svg | Graphs showing the relationship between the roots, and turning, stationary and inflection points of a cubic polynomial, and its first and second derivatives by CMG Lee. Thanks to en:user:GalacticShoe for an algorithm to exactly draw a cubic polynomial segment with a cubic Bezier. | |
Source | Own work | |
Author | Cmglee | |
Other versions |
|
Python script to find distinct non-zero integer values
#!/usr/bin/env python
import re
def eval_at(x): return a * x ** 3 + b * x ** 2 + c * x + d
def is_integer(x): return abs(x - int(x)) < 1e-5
def print_keyval(dic, re_key):
print('\t'.join(sorted(['%s=%s' % (key, dic[key])
for key in dic if re.search(re_key, key)])))
## http://wolframalpha.com/input?i=expand+%28x-r1%29%28x-r2%29%5E2
## http://wolframalpha.com/input?i=differentiate+(x-r1)(x-r2)(x-r2)
## http://wolframalpha.com/input?i=solve+2r1*r2-2r1*x%2Br2^2-4r2*x%2B3x^2%3D0+for+x
## http://wolframalpha.com/input?i=differentiate+(x-r2)(x-(2r1%2Br2)%2F3)
## http://wolframalpha.com/input?i=solve+2x-2r1%2F3-4r2%2F3%3D0+for+x
## http://wolframalpha.com/input?i=y%3D(x-4)(x-1)^2
## http://www.wolframalpha.com/input?i=factorise+3x^2-12x%2B9
## Cubic bezier control points from left to right, to be populated
pts = [[-1,None], [None,None], [None,None], [5,None]]
n = 4 ## search range = [-n, n]
for r2 in range(n, -1 - n, -1):
for r1 in range(n, r2 , -1):
if r1 * r2 == 0: continue
r_1 = (2 * r1 + r2) / 3.0
r_2 = r2
if is_integer(r_1) and r_1 != 0: r_1 = int(r_1)
else: continue
r__ = (r1 + 2 * r2) / 3.0
if is_integer(r__) and r__ != 0: r__ = int(r__)
else: continue
if len(set([r1, r_1, r__])) < 3: continue
a = 1
b = -2 * r2 - r1
c = r2 * (2 * r1 + r2)
d = -r1 * r2 * r2
p = pts[0][0]
q = pts[3][0]
pts[0][1] = eval_at(p)
pts[3][1] = eval_at(q)
pts[1][0] = (2 * p + q) / 3.0
pts[1][1] = a * p * p * q + b * (p * p + 2 * p * q) / 3.0 + c * (2 * p + q) / 3.0 + d
pts[2][0] = (p + 2 * q) / 3.0
pts[2][1] = a * p * q * q + b * (q * q + 2 * p * q) / 3.0 + c * (p + 2 * q) / 3.0 + d
print_keyval(locals(), r'^(r_*\d?|[abcd]|pts)$')
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- 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.
![]() |
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
image/svg+xml
62626688038d3e1672b4ffed83c881346c2476d2
6,753 byte
512 pixel
512 pixel
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 04:21, 4 February 2024 | ![]() | 512 × 512 (7 KB) | commons>Cmglee | Shrink font and simplify labels // Editing SVG source code using c:User:Rillke/SVGedit.js |
File usage
There are no pages that use this file.
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Short title | cubic graph special points repeated |
---|---|
Image title | Graphs showing the relationship between the roots, and turning, stationary and inflection points of a cubic polynomial, and its first and second derivatives by CMG Lee. |
Width | 100% |
Height | 100% |
Retrieved from "https://mdwiki.org/wiki/File:Cubic_graph_special_points_repeated.svg"