File:Field tidal.svg

Summary

Description
English: Differential gravity field that causes tides.
Date
Source Own work
Author Krishnavedala
Other versions
SVG development
InfoField
 The SVG code is valid.
 This plot was created with Matplotlib.
Category:Valid SVG created with Matplotlib code#Field%20tidal.svg
 The file size of this SVG plot may be irrationally large because its text has been converted to paths inhibiting translations.
Category:Path text SVG
Source code
InfoField
Matplotlib code
import matplotlib.pyplot as plt
import numpy as np

if __name__ == "__main__":
    fig = plt.figure(figsize=(15.2, 8))
    ax = fig.add_subplot(111)

    R = 10
    p0, q0 = [20, 0], [-20, 0]
    k = 275

    dist = lambda p1, p2: np.sqrt( (p1[0]-p2[0])**2 + (p1[1]-p2[1])**2 )
    force = lambda r: - k / r**2

    theta = np.linspace(-np.pi, np.pi, 50)
    for t in theta:
        p1 = [-R * np.cos(t), R * np.sin(t)]
        if t < np.pi * 0.5 and t > -np.pi * 0.5:
            r = dist(q0, p1)
        else:
            r = dist(p0, p1)
        F = force(r)
        ax.arrow(p1[0], p1[1], F * np.cos(t), F * np.sin(t), head_width=0.5, head_length=0.7, fc='k')

    ax.annotate(r"+", xytext=(0,0), size=30, xy=(0,0), ha="center", va="center")
    ax.annotate(r"Satellite", xy=(25,0), xytext=(15,0),
                size=30, va="center",
                arrowprops=dict(arrowstyle="fancy", fc='k'))
    ax.set_xlim(-13, 25)
    ax.set_ylim(-11, 11)
    ax.plot(-R * np.cos(theta), R * np.sin(theta), linewidth=3.)
    ax.axis('off')
    plt.savefig('field tidal.svg', bbox_inches='tight', pad_inches=.15, transparent='true')

See also

Alternative version of the same image
Derived version
Category:Tidal forces Category:Images with Python source code

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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.
Category:CC-BY-SA-3.0#Field%20tidal.svgCategory:Self-published work
Category:CC-BY-SA-3.0 Category:Images with Python source code Category:Path text SVG Category:Self-published work Category:Tidal forces Category:Valid SVG created with Matplotlib code