# Let's use math my nerds

(Isaac Ullah) #21

(G'MIC staff) #22

Iāve got some nice formulas (from my HDR), to test :

\forall X\in\Omega, I^{[t]}_{(X)} = \int_{-\infty}^{+\infty} I^{[t=0]}(C^X_{(p)})\;{G_{\sqrt{2t}}}_{(p)}\;dp

#23

I always thought if maths was being considered as a programming language, youād get laughed out the room.

āSo, the instructions areā¦ individual symbols? And they can have multiple different meanings (which can change over time). And the meaning is altered depending on position on the page and text size, relative to other symbols? Iām not so sure about thisā¦ā

#24

Trying cut-n-paste with some asciimath favorites from the web:

## Ramanujan Identity

\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\ldots} } } }

## Maxwellās Equations

\begin{align} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\\\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{align}

#25

test.

I ^{\small{6 \atop 4 }} V _ I

\cancel{\Large{I}^ {6 \atop 4} \ V _{\_\_}\ I}

\overbrace{\rm \Large{Fr^{{^{+6}}} \ I}^{_6 \atop _4} \ V _{\_\_} I}^{\LARGE{typical}}

āāāā
Thatās more like it. 3 cheers if you know what that even is.

#26

The simple secret to true happiness, the French way.

/Claes

#27

Test

I_M(\tau) = \int_{-\infty}^{+\infty}|E(t)E(t-\tau)|^2dt = \int_{-\infty}^{+\infty}I(t)I(t-\tau)dt

#28

Quiz:

\LARGE F(j\omega)=\int_{-\infty}^\infty f(t)e^{-j\omega t}dt
\LARGE F(j\omega)=\sum_{k=0}^{N-1}f[k]e^{-j\omega kT}

(Roel) #29

@HIRAM Those last two look like Fourier transforms to me. Your first one is more obscure (from a science point of view), but I believe after some searching the solution sounds pretty nice

#30

Yes itās from the discrete fourier transform, used for sample-based inputs.

\LARGE \rm WELL\ š\ DONE

Hereās a DFT example.

#31

I love this explanation

(Martin Scharnke) #32

Roel, can you post a link for the ignorant like me who havenāt been able to fathom the more obscure formula (whose solution you say sounds pretty nice)?

(Roel) #33

I found this: http://www.musictheoryteacher.com/pb/wp_4c673257/wp_4c673257.html and https://en.m.wikipedia.org/wiki/Augmented_sixth_chord pretty useful.

(Martin Scharnke) #34

Thanks!

#35

Hereās la formule obscure and the ffmpeg command that generates its video.

ffmpeg -i Fr6.m4a -filter_complex \
>  [0:a]showspectrum=mode=separate:color=intensity:scale=cbrt:s=640x518[ss]; \
>  [0:a]showwaves=s=1280x202:mode=line[sw]; \
>  [vs][ss]overlay=w[bg]; \
>  [bg][sw]overlay=0:H-h,drawtext=fontfile=/Users/rb/graphite/tests/fonts/general.ttf:fontcolor=white:x=10:y=10:text='\"French Augmented Sixth\" '[out]" \
> -map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a copy output.mp4
ffmpeg version N-92666-g00502370f6-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil      56. 24.101 / 56. 24.101
libavcodec     58. 42.100 / 58. 42.100
libavformat    58. 24.100 / 58. 24.100
libavdevice    58.  6.101 / 58.  6.101
libavfilter     7. 46.101 /  7. 46.101
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Fr6.m4a':
major_brand     : M4A
minor_version   : 0
compatible_brands: M4A mp42isom
creation_time   : 2018-12-11T16:28:48.000000Z
iTunSMPB        :  00000000 00000840 000003AA 00000000000D6416 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
encoder         : com.apple.VoiceMemos (iOS 12.1)
Duration: 00:00:19.90, start: 0.047891, bitrate: 64 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
creation_time   : 2018-12-11T16:28:48.000000Z
handler_name    : Core Media Audio
Stream mapping:
Stream #0:0 (aac) -> avectorscope
Stream #0:0 (aac) -> showspectrum
Stream #0:0 (aac) -> showwaves
drawtext -> Stream #0:0 (libx264)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x7fba6601c800] using SAR=1/1
[libx264 @ 0x7fba6601c800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7fba6601c800] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fba6601c800] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
major_brand     : M4A
minor_version   : 0
compatible_brands: M4A mp42isom
iTunSMPB        :  00000000 00000840 000003AA 00000000000D6416 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
encoder         : Lavf58.24.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
encoder         : Lavc58.42.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
creation_time   : 2018-12-11T16:28:48.000000Z
handler_name    : Core Media Audio
frame=  499 fps=125 q=-1.0 Lsize=    1018kB time=00:00:19.89 bitrate= 418.9kbits/s speed=   5x
[libx264 @ 0x7fba6601c800] frame I:2     Avg QP:15.94  size: 25360
[libx264 @ 0x7fba6601c800] frame P:129   Avg QP:15.86  size:  2513
[libx264 @ 0x7fba6601c800] frame B:368   Avg QP:20.18  size:  1337
[libx264 @ 0x7fba6601c800] consecutive B-frames:  1.0%  1.6%  1.2% 96.2%
[libx264 @ 0x7fba6601c800] mb I  I16..4:  7.5% 88.9%  3.6%
[libx264 @ 0x7fba6601c800] mb P  I16..4:  0.4%  0.5%  0.6%  P16..4:  3.3%  0.9%  0.4%  0.0%  0.0%    skip:94.0%
[libx264 @ 0x7fba6601c800] mb B  I16..4:  0.6%  0.0%  0.3%  B16..8:  1.3%  1.1%  0.1%  direct: 0.1%  skip:96.5%  L0:49.3% L1:47.9% BI: 2.8%
[libx264 @ 0x7fba6601c800] 8x8 transform intra:34.8% inter:10.7%
[libx264 @ 0x7fba6601c800] coded y,uvDC,uvAC intra: 19.2% 50.4% 47.5% inter: 0.4% 1.4% 1.2%
[libx264 @ 0x7fba6601c800] i16 v,h,dc,p: 55% 44%  1%  0%
[libx264 @ 0x7fba6601c800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 64% 10% 25%  1%  0%  0%  0%  0%  0%
[libx264 @ 0x7fba6601c800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 39% 47%  0%  1%  0%  3%  0%  2%
[libx264 @ 0x7fba6601c800] i8c dc,h,v,p: 43% 36% 21%  1%
[libx264 @ 0x7fba6601c800] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fba6601c800] ref P L0: 74.4% 25.6%
[libx264 @ 0x7fba6601c800] ref B L0: 73.0% 27.0%
[libx264 @ 0x7fba6601c800] ref B L1: 85.8% 14.2%
[libx264 @ 0x7fba6601c800] kb/s:347.40

(darix) unpinned #36

#37

Wider equations donāt scroll. They are cut off on a smaller and narrower screen / window. E.g., the last Z is chopped off on my mobile.

\overrightarrow{XYZ}_R * R+ \overrightarrow{XYZ}_G * G + \overrightarrow{XYZ}_B * B = \overrightarrow{XYZ}

BTW, using the context menu is pretty handy in learning about the code.

(darix) #38

can you report this upstream?

#39

Done. Weird that the MathJax isnāt rendering over thereā¦