text: I wanted to point out some of the python capabilities that I have found useful in my particular application, which is to calculate the power spectrum of an image (for later se. To overcome this issue, we use log transform. It is very famous n dimentional array for machine learning and data sciece. fft) With pyfftw, the kernel is multi-threaded but does not support mpi. Fourier Transforms and the Fast Fourier Transform (FFT) Algorithm Paul Heckbert Feb. Threading; using System. fft, which seems reasonable. Para el cálculo de la DFT se utiliza un algoritmo rápido llamado Transformada Rápida de Fourier (o Fast Fourier Transform en inglés, abreviado como FFT). This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. float32, numpy. Example-6: Using scipy module for mathematical calculation. About this. Consider the sampled signal for and some positive scalar. You can do this by replacing the respective lines of your code with the following:. We can initialize numpy arrays from nested Python lists and access its elements. In mathematics, the discrete Fourier transform (DFT) converts a finite list of equally spaced samples of a function into the list of coefficients of a finite combination of complex sinusoids, ordered by their frequencies, that has those same sample values. NumPy – A Replacement for MatLab NumPy is often used along with packages like SciPy (Scientific Python) and Mat−plotlib (plotting library). In this NumPy tutorial, we are going to discuss the features, Installation and NumPy ndarray. This will allow the user to get started with analysis of acoustic-like signals and understand the fundamentals of the Fast Fourier Transform. This function computes the inverse of the 2-dimensional discrete Fourier Transform over any number of axes in an M-dimensional array by means of the Fast Fourier Transform (FFT). This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. pyo is a Python module containing classes for a wide variety of audio signal processing types. It is also known as backward Fourier transform. Numpy does the calculation of the squared norm component by component. 1 - a C package on PyPI - Libraries. The Discrete Fourier Transform (DFT) is the finite-resolution version of the Fourier Transform that we use for sampled signals such as audio clips. We will focus on understanding the math behind the formula and use Python to do some simple applications of the DFT and fully appreciate its utility. Fourier Descriptor. In this post, I’m going to show you how to actually apply Fourier Transform with cv2 or numpy. involved, but the element-by-element operation is speedily executed by pre-compiled C code. NumPy is the fundamental library of Python for computing. The Fourier Transform will decompose an image into its sinus and cosines components. By voting up you can indicate which examples are most useful and appropriate. It also provides the final resulting code in multiple programming languages. Here are the examples of the python api numpy. Code example. pyplot as plt def. This is an example of 1-dimensional Fourier Transform on sound information recorded by a mic. Numpy is the basic library for scientific programming in Python and it has its own implementation of the fast Fourier transform (FFT) algorithm. Python NumPy Tutorial – Learn NumPy With Examples What Exactly Is NumPy ? NumPy is a high-performance multidimensional array library in python. integrate-Routines for numerical. I have implemented the 3Blue1Brown's description of Fourier transform in Python+numpy for irregular and unsorted data, as described here. It gives an ability to create multidimensional array objects and perform faster mathematical operations. In astronomy it is used to find periodic signals in time-series datasets and this is exactly what I used it for. It is also quite useful while dealing with multi-dimensional data. One question or concern I get a lot is that people want to learn deep learning and data science, so they take these courses, but they get left behind because they don't know enough about the Numpy stack in order to turn those concepts into code. The only dependent library is numpy for 2-d signals. If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on FreeNode. From Fourier transforms and splines to minimizations and numerical integrations. Practical DSP in Python : Over 70 examples, FFT,Filter Design, IIR,FIR, Window Filters,Convolution,Linear Systems etc 4. NumPy provides numerous features which can be used by Python enthusiasts and programmers to work with high-performing arrays and matrices. NumPy Array: Numpy array is a powerful N-dimensional array object which is in the form of rows and columns. Optimized Fast Fourier Transforms in NumPy and SciPy FFT The key to these optimizations is the Intel MKL, with its native optimizations for FFT as needed by a range of NumPy and SciPy functions. You will see many examples that use the import as np convention if you search for NumPy. 3 Fourier transform of a sound file. 3 Fourier Transform Lab Student Edition is an advanced application designed for performing Fourier transformations, which can be useful in teaching Crystallography, since they are related to Optical Transforms (e. In the tutorial, the free-hand filter enables visitors to filter the fourier transform of the specimen image using as many elliptical or circular filter masks as desired. #r# N = 1000 # number of sample points dt = 1. The Python example uses a sine wave with multiple frequencies 1 Hertz, 2 Hertz and 4 Hertz. For example, think about a mechanic who takes a sound sample of an engine and then relies on a machine to analyze that sample, looking for. Moreover, we will cover the data types and array in NumPy. Parameters x array_like. This tutorial covers step by step, how to perform a Fast Fourier Transform with Python. If a function is defined over the entire real line, it may still have a Fourier series representation if it is periodic. x/e−i!x dx and the inverse Fourier transform is. # Call ff a copy of the original transform. In this example we used numpy as our engine for the fft and ifft. Help and/or examples appreciated. import numpy as np. scipy can be compared to other standard scientific-computing libraries, such as the GSL (GNU Scientific Library for C and C++), or Matlab’s toolboxes. The Fast Fourier Transform (FFT) is an efficient way to do the DFT, and there are many different algorithms to accomplish the FFT. We’re going to learn in this tutorial how to detect the lines of the road in a live video using Opencv with Python. The Fourier Transform proposes to decompose any signal into a sum of sin and cos. Linear algebra, random number generation, and Fourier transform capabilities. # Regular Python boolean operators (and, or) cannot be used here. Background What is the Fourier transform? At a high level the Fourier transform is a mathematical function which transforms a signal from the time domain to the. example for plotting, the program numpy_fft. The sample source code uses this approach to calculate a Fourier transform from a time history signal. Read and plot the image; Compute the. In order to perform FFT (Fast Fourier Transform) instead of the much slower DFT (Discrete Fourier Transfer) the image must be transformed so that the width and height are an integer power of 2. One common way to perform such an analysis is to use a Fast Fourier Transform (FFT) to convert the sound from the frequency domain to the time domain. The FFT decomposes an image into. we will use the python FFT routine can compare the performance with naive implementation. However, in general the scipy version should be prefered, because it uses more efficient underlying implementation. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. Useful linear algebra, Fourier transform, and random number capabilities; Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. This chapter exploit what happens if we do not use all the !’s. The Fourier transform (FT) decomposes a function of time (a signal) into the frequencies that make it up, in a way similar to how a musical chord can be expressed as the frequencies (or pitches) of its constituent notes. For example, consider a sound wave where the amplitude is varying with time. involved, but the element-by-element operation is speedily executed by pre-compiled C code. 2019-09-11: matplotlib. Discrete Fourier Transform and Inverse Discrete Fourier Transform. 1-d signals can simply be used as lists. Save thousands of dollars on expensive software, while keeping all the flexibility and power of your favourite programming language. • The Fourier Transform. pyplot as plt import scipy. NumPy is built on the Numeric code base and adds features introduced by numarray as well as an extended C-API and the ability to create arrays of arbitrary type which also makes NumPy suitable for interfacing with general-purpose data-base applications. DFT Example Implementing the discrete Fourier transform is simple – Double sum: for each wavenumber, we sum over all the spatial points def dft(f_n): N = len(f_n) f_k = numpy. There are potential execution speed advantages to this mixed language approach. y [Returned value] [ complex ndarray ] Discrete Fourier Transform of x. The input signal. So is the Fourier transform meant to be used with signals like that? Because a signal like f(t) = t^2, has no frequency no matter how you look at it, and if you take its Fourier transform and transform it to the frequency domain it doesn't really make sense, since its just a parabola which doesn't repeat. GitHub Gist: instantly share code, notes, and snippets. I tried using fft module from numpy but it seems more dedicated to Fourier transforms than series. Maybe it a lack of mathematical knowledge, but I can't see how to calculate the Fourier coefficients. This algorithm is implemented in SciPy and NumPy. randn() function: This function return a sample (or samples) from the "standard normal" distribution. float64) - numpy data type for input/output arrays. PyLops implements a second engine (engine='fftw') which uses the well-known FFTW via the python wrapper pyfftw. Arbitrary data-types can be defined. It includes, for example, an array object, linear algebra functions, fft, and advanced random number generation capabilities. The signal has to be strictly periodic, which introduces the so called windowing to eliminate the leakage effect. - Numericmatrix package was designed in 1995. Although identical for even-length x, the functions differ by one sample for odd-length x. In this series, we'll build an audio spectrum analyzer using pyaudio and matplotlib. En este artículo vamos a ver cómo calcular la transformada de Fourier discreta (o DFT) de una señal en Python utilizando la transformada rápida de Fourier (o FFT) implementada en SciPy. Now let me demonstrate an example of using SciPy module to perform Fourier transform on our time series data. PyWavelets is a free Open Source wavelet transform software for Python programming language. GPU Computing with CUDA Lecture 8 - CUDA Libraries - CUFFT, PyCUDA Christopher Cooper Boston University August, 2011 UTFSM, Valparaíso, Chile 1. take with mode='wrap'. This algorithm is implemented in SciPy and NumPy. Applications NumPy is used in. , for filtering, and in. Python has built-in support for integers, floating point and. This video demonstrates how to create a Fourier image from an 8bpp indexed/grayscale image in Python 3 using Pillow/PIL and numpy. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. They are extracted from open source Python projects. mean(input_array) Performing mathematical functions are as easily called: input_array *= -1. integrate-Routines for numerical. laser diffraction patterns). shape is necessary like len(a) is for irfft`, and for the same reason. This is a C++ Program to perform Discrete Fourier Transform using Naive approach. 1 MPI/MPI for Python (mpi4py) The [mpi4py] Python package contains wrappers for almost the entire MPI and it has been shown to be able to distribute NumPy arrays at the speed of regular C arrays. So the resultant array is NFFT times smaller than the original data. There are also basic facilities for discrete fourier transform,. It has been built to work with the N-dimensional array, linear algebra, random number, Fourier transform, etc. import numpy as np import matplotlib. They are extracted from open source Python projects. The Fourier transform is commonly used to convert a signal in the time spectrum to a frequency spectrum. Links: Pillow: https://pyt. kyungminlee 4. mp4") Then we load the subtractor. The sample source code uses this approach to calculate a Fourier transform from a time history signal. Examples of time spectra are sound waves, electricity, mechanical vibrations etc. You can vote up the examples you like or vote down the ones you don't like. Numpy •Fundamental package for scientific computing with Python •N-dimensional array object •Linear algebra, Fourier transform, random number capabilities •Building block for other packages (e. The basic principle of frequency domain analysis in image filtering is to computer 2D discrete Fourier transform of the image. In this entry, we will closely examine the discrete Fourier Transform in Excel (aka DFT) and its inverse, as well as data filtering using DFT outputs. Arbitrary data-types can be defined. Darkness is Coming Kevin MacLeod (incompetech. fft Building Intuition. Still, all of the programming assignments can also be run on the cloud on MyBinder. Following is an example of a sine function, which will be used to calculate Fourier transform using the fftpack module. From Discrete Fourier Transform to Non-Uniform Fourier Transform. Loading Unsubscribe from Building Intuition? Cancel Unsubscribe. Using Python for Signal Processing and Visualization Erik W. Also Read: [Udemy 100% Free]-Python: Build a Python Calculator from Scratch. Lastest release. When applied to the time series data, the Fourier analysis transforms maps onto the frequency domain, producing a frequency spectrum. The Fourier transform (FT) decomposes a function of time (a signal) into the frequencies that make it up, in a way similar to how a musical chord can be expressed as the frequencies (or pitches) of its constituent notes. python code examples for numpy. Edge detection in images using Fourier Transform. Even Odd f( t) = f(t) f( t) = f(t) Symmetric Anti-symmetric Cosines Sines Transform is real Transform is imaginary for real-valued signals. The name is an acronym for "Numeric Python" or "Numerical Python" Features Of NumPy. You can vote up the examples you like or vote down the ones you don't like. It is a fundamental technique in computer vision. I've used it for years, but having no formal computer science background, It occurred to me this week that I've never thought to ask how the FFT computes the discrete Fourier transform so quickly. Scipy includes a wealth of algorithms that you probably need but you don’t want to code. Of course, we must somehow remove the infinitely long tails of the Gaussian window in practice, but this does not cause much deviation from a parabola. Using the inv() and dot() Methods. Start learning now. frame structure in R, you have some way to work with them at a faster processing speed in Python. For further introductory help the user is directed to the NumPy documentation. Unlike other domains such as Hough and Radon, the FFT method preserves all original data. pyplot as plt def. OpenCV-Python Tutorials latest OpenCV-Python Tutorials. Deﬁnition of the Fourier Transform The Fourier transform (FT) of the function f. The content of this site is licensed under the Creative Commons Attribution-NonCommercial 4. NumPy is the fundamental library of Python for computing. The Fourier Transform proposes to decompose any signal into a sum of sin and cos. python code examples for numpy. You can also look at nitime libraries. SciPy IFFT scipy. In NumPy c=a * b does what the earlier examples do, at near-C speeds, but with the code simplicity we expect from something based on Python. They are extracted from open source Python projects. The signal is plotted using the numpy. How to scale the x- and y-axis in the amplitude spectrum. Numpy arrays have a copy Download Python source code: Image denoising by FFT. Like a lot of abstract concepts, it is easy to understand the basic premise and you could look up any of the mathematical algorithms that can take a signal and perform a Fourier transform on it. For example, think about a mechanic who takes a sound sample of an engine and then relies on a machine to analyze that sample, looking for. ifft2¶ numpy. I have 1024 sample points, and I would like to do really simple extrapolation using Fourier transformation. I now want to preform a fft on that array, using a module like numpy, and use the result to create the graphical spectrum analyzer, which, to start will just be 32 bars. While wondering around in the Matlab documentation I found out there is a simple way to calculate the Fourier transform of any function using Matlab. Deep Learning Prerequisites: The Numpy Stack in Python download - Udemy Coupon - 100% discount. The Fourier transform is linear, meaning that the transform of Ax(t) + By(t) is AX(ξ) + BY(ξ), where A and B are constants, and X and Y are the transforms of x and y. The content of this site is licensed under the Creative Commons Attribution-NonCommercial 4. NumPy, a library for numeric computing. Transforms are used to make certain integrals and differential equations easier to solve algebraically. Arbitrary data-types can be defined using Numpy which allows NumPy to seamlessly and speedily integrate with a wide variety of databases. NumPy is a module for Python. That said, I highly doubt switching FFT packages/implementations is going to fix anything. 0) [source] ¶ Return the Discrete Fourier Transform sample frequencies. shape [axis], x is zero-padded. The name is an acronym for “Numeric Python” or “Numerical Python” Features Of NumPy. There are also basic facilities for discrete fourier transform, basic linear algebra and random number generation. pyplot as plt def. The reasons for this are essentially convenience. SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering. fftpack to compute the FFT and display the audio spectrum in real time. pyplot provides the specgram() method which takes a signal as an input and plots the spectrogram. 001 sec, yielding a Nyqvist of Fn=1/(2*dt)=500 Hz. If you take its Fast Fourier Transform (FFT), then you will obtain a vector z as z = F s , where F is the FFT matrix and s is a vector in which only the i-th entry is nonzero and equal to 1. Plus, FFT fully transforms images into the frequency domain, unlike time-frequency or wavelet transforms. Definition of the Discrete Fourier Transform (DFT) Definition of Non-uniform Discrete Fourier Transform (NDFT) Signal Reconstruction by using the Fourier transform. Numpy replaces the python-numeric and python-numarray modules which are now deprecated and shouldn't be used except to support older software. NumPy is often used along with packages like SciPy (Scientific Python) and Mat−plotlib (plotting library). Fast Fourier Transforms. fftpack import fft import matplotlib. It is also quite useful while dealing with multi-dimensional data. The different chapters each correspond to a 1 to 2 hours course with increasing level of expertise, from beginner to expert. The Python code we are writing is, however, very minimal. This course is a very basic introduction to the Discrete Fourier Transform. Discrete Fourier Transform - Simple Step by Step; My blog¶ Implement the Spectrogram from scratch in python; Decode the dial-up sounds using Spectrogram; Discrete Fourier Transform¶ The theory only has two equations. The default normalization has the direct transforms unscaled and the inverse transforms are scaled by. Here is the python code to compute and plot the fourier transform of an input image as above. They are extracted from open source Python projects. The signal has to be strictly periodic, which introduces the so called windowing to eliminate the leakage effect. The NVIDIA CUDA Fast Fourier Transform library (cuFFT) provides GPU-accelerated FFT implementations that perform up to 10x faster than CPU-only alternatives. In other words, it will transform an image from its spatial domain to its frequency domain. Numpy arrays have a copy Download Python source code: Image denoising by FFT. Dividing by $\sqrt{2\pi}$ is to match the convention Fourier transform convention used by Wolfram Alpha; The scaling by the total time t1-t0 was figured out experimentally. You can vote up the examples you like or vote down the ones you don't like. Python and the fast Fourier transform. Input array. Today, we will compute Discrete Fourier Transform (DFT) and inverse DFT using SciPy stack. If you install Numpy, it is worth also installing Scipy. This allows arbitrary data-types can be defined and will NumPy to speedily and efficiently integrate with a wide variety of databases. Of course, we must somehow remove the infinitely long tails of the Gaussian window in practice, but this does not cause much deviation from a parabola. Like a lot of abstract concepts, it is easy to understand the basic premise and you could look up any of the mathematical algorithms that can take a signal and perform a Fourier transform on it. Scipy 2012 (15 minute talk) Scipy 2013 (20 minute talk) Citing. This allows arbitrary data-types can be defined and will NumPy to speedily and efficiently integrate with a wide variety of databases. The reason for doing the filtering in the frequency domain is generally because it is computationally faster to perform two 2D Fourier transforms and a filter multiply than to perform a convolution in the image (spatial) domain. They are extracted from open source Python projects. The discrete Fourier transform (bottom panel) for two noisy data sets shown in the top panel. fftpack- Algorithms for Discrete Fourier Transform. Fast Fourier transforms: scipy. It can be integrated to C/C++ and Fortran. It converts a space or time signal to signal of the frequency domain. Examples of time spectra are sound waves, electricity, mechanical vibrations etc. randn() function with example in python | 2019 Posted on March 11, 2019 April 15, 2019 by admin numpy. NumPy Array: Numpy array is a powerful N-dimensional array object which is in the form of rows and columns. Tags : Software Development: Python Development , Libraries , Field: field::mathematics, implemented-in::python, Role: Development Library. NumPy's operations are divided into three main categories: Fourier Transform and Shape Manipulation, Mathematical and Logical Operations, and Linear Algebra and Random. So not to rain on your parade but it seems that you have just used numpy's fft. The Fourier transform is linear, meaning that the transform of Ax(t) + By(t) is AX(ξ) + BY(ξ), where A and B are constants, and X and Y are the transforms of x and y. They are extracted from open source Python projects. What is NumPy?¶ NumPy is the fundamental package for scientific computing in Python. This course is a very basic introduction to the Discrete Fourier Transform. Once you have done that, NumPy functions are available as numpy. NumPy Numerical Python is a library used for scientific computing. 0 International License. They are extracted from open source Python projects. Indeed, the NumPy idiom is even simpler! This last example illustrates two of NumPy's features which are. In this tutorial you will find solutions for your numeric and scientific computational problems using NumPy. Discrete Fourier transforms with Numpy. pyo is a Python module containing classes for a wide variety of audio signal processing types. Fast Fourier transform explained A fast Fourier transform ( FFT ) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Los detalles al respecto se pueden encontrar en cualquier libro de texto de procesamiento de imágenes o procesamiento de señales. Intel Distribution for Python exposes [a] Python interface to MKL's [sic] FFT functionality, enhancing NumPy. NumPy is a module for Python. By default a flattened input is used. Links: Pillow: https://pyt. Forward Fourier transform 1. Fourier Transforms in NumPy. En este artículo vamos a ver cómo calcular la transformada de Fourier discreta (o DFT) de una señal en Python utilizando la transformada rápida de Fourier (o FFT) implementada en SciPy. Numpy Array. The figure below shows 0,25 seconds of Kendrick’s tune. scipy is the core package for scientific routines in Python; it is meant to operate efficiently on numpy arrays, so that numpy and scipy work hand in hand. I now want to preform a fft on that array, using a module like numpy, and use the result to create the graphical spectrum analyzer, which, to start will just be 32 bars. The windowed Fourier transform is defined by. The Fourier Analysis in the following examples uses a climatological data set derived from ERA-Interim data spanning 1989-2005. It also has n-dimensional Fourier Transforms as well. It is one of the most useful and widely used tools in many applications. Here are the examples of the python api numpy. MATLAB also supports specialized math, such as eigenvalues, linear math, Fourier transforms, signal process and Bessel functions. n Optional [ int] Length of the Fourier transform. real taken from open source projects. I have access to numpy and scipy and want to create a simple FFT of a dataset. Now we will see how to find the Fourier Transform. Para el cálculo de la DFT se utiliza un algoritmo rápido llamado Transformada Rápida de Fourier (o Fast Fourier Transform en inglés, abreviado como FFT). The input signal. >>> import numpy. The most essential one is Numpy, which gives python the ability to work efficiently with arrays. Discrete Fourier transform example - numpy. NumPy is a programming language that deals with multi-dimensional arrays and matrices. Its first argument is the input image, which is grayscale. 001 sec, yielding a Nyqvist of Fn=1/(2*dt)=500 Hz. Inside the parenthesis we can change the value of the subtractor. By applying Fourier Transform on such signal, which is time domain information, we can know, for example, how much 3000 Hz component is included in the signal. For example, Scipy can do many common statistics calculations, including getting the PDF value, the CDF value, sampling from a distribution, and statistical testing. use('bmh') tmax, N, f = 5, 100, 0. In astronomy it is used to find periodic signals in time-series datasets and this is exactly what I used it for. An Intuitive Explanation of Fourier Theory Steven Lehar slehar@cns. scipy can be compared to other standard scientific-computing libraries, such as the GSL (GNU Scientific Library for C and C++), or Matlab’s toolboxes. It includes, for example, an array object, linear algebra functions, fft, and advanced random number generation capabilities. The code I used was done in Matlab, although you could use pretty much anything (C, Java, python, etc). Fourier transform. So, the formula of Fourier transform we will discuss in this story is called Discrete Fourier Transform (DFT). NumPy – A Replacement for MatLab NumPy is often used along with packages like SciPy (Scientific Python) and Mat−plotlib (plotting library). That's fine, but not very clear from the title. See the installation notes for how to install these interfaces; the main thing to remember is to compile the library before trying to pip install. There are also basic facilities for discrete fourier transform,. NumPy provides numerous features which can be used by Python enthusiasts and programmers to work with high-performing arrays and matrices. fft has a function ifft() which does the inverse transformation of the DTFT. complex128, numpy. For example, Scipy can do many common statistics calculations, including getting the PDF value, the CDF value, sampling from a distribution, and statistical testing. org : NumPy is the fundamental package for scientific computing with Python. Its first argument is the input image, which is grayscale. The Fourier amplitude spectrum (lower) shows that the 700 Hz signal frequency is wrapped, or reflected across, the Nyqvist frequency to appear as aliased energy at 300 Hz. mean(input_array) Performing mathematical functions are as easily called: input_array *= -1. • The Fourier Transform. Fourier Analysis Convolution, deconvolution, filtering, correlation and autocorrelation, power spectrum are easy for evenly sampled, high signal-to-noise data. Here are the examples of the python api numpy. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic. We will focus on understanding the math behind the formula and use Python to do some simple applications of the DFT and fully appreciate its utility. One question or concern I get a lot is that people want to learn deep learning and data science, so they take these courses, but they get left behind because they don’t know enough about the Numpy stack in order to turn those concepts into code. import numpy as np. The name is an acronym for "Numeric Python" or "Numerical Python". NumPy (or Numeric Python) is a library of mathematical functions that helps us solving problems related to matrices, N-dimensional arrays, Fourier series and linear algebra. NumPy is the standard library for scientific computing with powerful tools to integrate with C and C++. ifftshift¶ numpy. They are extracted from open source Python projects. The inverse transform is The inverse transform is i. This way you ensure that your surrogate is real. FFT onlyneeds Nlog 2 (N). I've been working on implementing an efficient Radix2 Fast Fourier Transform in C++ and I seem to have hit a roadblock. OpenCV-Python Tutorials latest OpenCV-Python Tutorials. You will investigate the effects of windowing and zero-padding on the Discrete Fourier Transform of a signal, as well as the effects of data-set quantities and weighting windows used in Power Spectral Density Estimation. Here is the python code to compute and plot the fourier transform of an input image as above. While this gives a basic view of response time and throughput, it doesn't show failures, nor how the server responds as load increases. This is a great way to learn about how the algorithm works. In the previous posts, we have seen what Fourier Transform of images is and how to actually do it with opencv and numpy. Whenever you have some numbers, you most probably want to store them in a np. Computers are usually used to calculate Fourier transforms of anything but the simplest signals. real_if_close which transforms a complex-valued number with tiny imaginary part into a real number. It includes everything from installation, functions, matrices, and modules to testing, all explained with appropriate examples. News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python. Libraries within Python include basic linear algebra functions, Fourier transforms, random number generators, and tools for integrating Fortran and C/C++ code.


text:
Services & ResourcesWolfram ForumsMathGroup Archive

Re: Assembling PDFs into a PDF document?

• To: mathgroup at smc.vnet.net
• Subject: [mg121266] Re: Assembling PDFs into a PDF document?
• From: Themis Matsoukas <tmatsoukas at me.com>
• Date: Tue, 6 Sep 2011 03:59:46 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

> Thanks very much -- but here's an even simpler way,
> using just Plain
> TeX and TeXShop, without needing to bring Mathematica
> into the picture
> at all.

I thought that the whole point of the challenge was to use Mathematica!  :-)

>
> %   To insert a centered PDF image in TeXShop
>
> \pageinsert
>    \null \vfill
>       \centerline{
>          \pdfximage
>             width xx in {my_pdf_file_name.pdf}
>          \pdfrefximage
>       \pdflastximage }
>    \vfill
> \endinsert
>
> where xx is the width in inches you want the PDF
> image to occupy on
> the page.
>
> Just write a TeX preamble that sets the various pdf
> page size,shape
> and margin parameters, then insert a bunch of these
> \pageinserts, one
> per file.
>

But don't you have to code the list of files manually? The notebook I posted produces a latex file  in which the list of files, however long, is processed by mathematica (see example below). You can probably adapt it to the plain TeX version.

\documentclass[11pt]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{pdf_files/fig2_ex_BWR.pdf}
\includepdf[pages=-]{pdf_files/fig2_interpolation.pdf}
\includepdf[pages=-]{pdf_files/mathematica.pdf}
\includepdf[pages=-]{pdf_files/solution.pdf}
\end{document}

As a side comment, pdfpages allows you to include pdf files with multiple pages and even to choose which pages to include. My example includes all pages.

> TeXShop and complete installation of TeX Live of
> course available as
> MacTeX from TUG; be sure to join TUG to support this.
>

There is also a support group dedicated to TeX on Mac: http://email.esm.psu.edu/mailman/listinfo/macosx-tex

Themis

• Prev by Date: Re: Quit versus Clear["Global*"]
• Next by Date: Re: Quit versus Clear["Global*"]
• Previous by thread: Re: Assembling PDFs into a PDF document?
• Next by thread: Re: ODE system - shooting for a terminal point

format: plain


text:
Curl in GR

1. Feb 3, 2008

snowstorm69

Can anyone explain to me how to expand this expression for curl which I find in the GR book I'm reading (by Hobson, Efstathiou and Lasenby, page 71)? In a section entitled Vector Operators in Component Form they state the curl as a "rank-2 antisymmetric tensor with components":

(curl)ab = DELaVb - DELbVa where a, b are subscripts, V is a vector(?, tensor?), and I used the admittedly poor notation "DEL" to indicate the nabla or del operator used to denote the grad of a scalar usually or the div of a vector.

I tried to write the components of this out with a going from 1 to 3 while keeping b at 1, then a going 1 to 3 with b at 2, and finally a going 1 to 3 with be at 3. In this way I got 9 pairs of terms, 18 terms in all (I don't have it in front of me but visualizing I think that's what I got). And ALL the terms cancel each other out. I believe my mistake is not taking into account the basis vectors and that if I had the terms would not all cancel out. They would yield the "curl" in 3-D.

What I get instead is for example the 1-3/3-1 pair of terms for the curl in 3-D, and then the same thing a bit later in the expansion, to cancel each other out.

Can you help me? I want to work the case out in 3-D so that I can next work it out in higher D. Obviously there are some things I don't understand about the basis vectors or perhaps the meaning of the notation itself.

Thanks.

Last edited: Feb 3, 2008
2. Feb 4, 2008

Mentz114

I don't follow how terms 'cancel out'. In 3 dimensions, you get 9 components, each of the form

$$\partial^aV^b - \partial^bV^a$$.

I'm assuming V is a vector with components Va ( a=1,2,3 etc)

Obviously the tensor is antsymmetric since swapping a and b changes the sign.

I think you are doing some unnecessary summation.

Are you doing a generalised curl ?

$$\epsilon^{\alpha\mu\nu}\partial_{\nu}V_{\mu}$$

This answer may be off-beam because I don't have the book.

Last edited: Feb 4, 2008
3. Feb 4, 2008

snowstorm69

you are right and...

Firstly, Thank you for your response.
Yes, I'm getting 9 components just like that. You are right I am summing them and it sounds like I should not be. Also, yes, this is supposed to be a generalized curl and I'm trying to see if it works out to the curl I know in 3-D (so I'll speak about 3-D in this) so I can then write it out for 4-D and 5-D. I've seen curl written like that with the Levi-civita symbol. But this book writes the curl in this way that I tried to describe which you nicely pasted higher up in your response; I've also seen it in an article that writes maxwell's equations in higher dimensions - as part of the differential form of Faraday's law in higher dimensions. (Once I get comfy with how to write that in higher dimensions, I want to take the curl of the curl of E in the differential form of Faraday's law (curl of both sides of that law) so I can derive the Helmholtz wave equation for electromagnetics in higher dimensions).
If I should not be summing these components, then it sounds like I need to make a matrix of them, which is what the left hand side of the book's equation suggests, namely it says "(curl)ab" where a and b are subscripts. But if this is a matrix or tensor, then if I try to write it out for 3-D to see if it matches Cartesian or better yet a generalized orthogonal 3-D situation, then which are the x components (if in cartesian) and which are the y, and the z? Or rather.. I know (or think) that the terms with derivatives NOT involving x should make up the x-component, and terms NOT involving y the y component, z similarly, and the terms where a=b (3 of my 9 term-pairs of that form you pasted nicely) will be zero, and I'm left with 6 non-zero term-pairs out of the original 9 (in Cartesian). But then that's 2 term-pairs for each coordinate x, y, z. And.. it just doesn't look like the 3-D curl to me. It WOULD looke like it if I ended up with only 3 term-pairs of that form you pasted.
I'm sorry I'm describing this in words instead of just somehow pasting you what I'm getting. If you knew of a place where the curl terms are written (or partially written) out for 3-D or any D really, please let me know. Don't know if this post will make much sense or give you a headache. My apologies if it does, not because it's complicated, but because my description is inadequate.
Thanks.

4. Feb 4, 2008

snowstorm69

by the way

by the way, it sounds like I should not sum; that I should leave them as a tensor (antisymmetric). If so I'm not sure how I would write the terms out if I wanted to write them equation style.

5. Feb 4, 2008

snowstorm69

here's a link to the page in the book

here's a link to the page in the book from google books (amazon also has a link to it). Don't worry this link is legal it's from google books as their way of advertising the book to sell it. Only if you have time... it's page 71. This link allows you to preview that page.

6. Feb 4, 2008

Mentz114

Hi Snowstorm, I see from page 71 that this is the ordinary curl I've written above. The diagonal elements are zero, and there are six remaining independent terms.

This thing is mostly seen in the EM field tensor which may be written -

$$F^{\mu\nu} = \partial^{\mu}A^{\nu} - \partial^{\nu}A^{\mu}$$

where A is the four-potential.

If you want a quick refresher on curl, try this

http://mathworld.wolfram.com/Curl.html

Like this -

$$F^{01} = \partial^{0}A^{1} - \partial^{1}A^{0}$$

$$F^{02} = \partial^{0}A^{2} - \partial^{2}A^{0}$$

etc

Last edited: Feb 4, 2008
7. Feb 6, 2008

snowstorm69

Thank you!

Hi, Mentz114,
I had to think about it to see if I was going to run into another question - I still might. But I was summing (as you aptly suggested) when I shouldn't have been, and you writing those out (and the link to the curl) helped out immensely. Thanks for your patience with this now seemingly silly question.

8. Feb 6, 2008

snowstorm69

1. wave eqn vs. particle motion; 2. curl curl in 5-D

I've got 2 questions now.
1. It seems that the GR book I'm reading comes up with a "wave equation" to describe the motion of a charged particle. This equation reminds me of the EM wave equation that you get when you take the curl of both sides of the differential form of Faraday's Law, which I thought described the motion of a propagating EM wave rather than the motion of a charged particle. Are both phenomena described by the same equation? Are both phenomena the same thing physically? Or are the 2 equations really different? Perhaps if one were to take the curl of both sides of Faraday's law in 3+1-D one would get something much more complicated looking than the equation that describes the motion of a charged particle?
2. I'd like to get that wave equation in 4+1-D. How should I do that? If the 2 above are the same equation, then I'll just follow the GR books derivation of this and apply it the way Klein did.
If they are different things then (and even if they aren't I'm still curious to know how to do this) I should perhaps write Maxwell's equations in 4+1-D and then take the curl of both sides of Faraday's Law to derive that good ole EM wave equation that I thought I learned about in undergrad.
To do that I'd need to know how to write the curl of the curl of E. If the 2 above equations mentioned in number 1 of my post now are the same then I'd like to still take the curl of the curl just to see if I get the same equation as the one the GR books come
up with.
I thought of 2 ways to get the curl of the curl. 1. use the levi-cevita symbol with ... 5?.. indices to operate on the expression given in the above post; 2. reapply the above to get the merates/components of the curl curl tensor; in index notation I'm not sure how to write it, but maybe it would be (curl curl E)abd = DELa Ebd - DELb Ead though I don't know if that makes sense index-wise...
Sorry for the gaping holes in my education.
- Snowstorm69

9. Feb 6, 2008

Mentz114

No idea what you are referring to. What equation ?

10. Feb 6, 2008

snowstorm69

wave equation? maybe not..

Here are 2 links to show the equation. Maybe I need to read more, but here they are:
In the first link page 141 looks like the EM wave equation if I think about the d'Alembertian operator being split into time and spatial derivatives.

Then when they talk about gravity here they say this situation is analogous to the EM situation and then on page 474 further below they call this the "wave equation".

11. Feb 6, 2008

snowstorm69

wave equation? maybe not..

Here are 2 links to show the equation. Maybe I need to read more, but here they are:
In the first link page 141 looks like the EM wave equation if I think about the d'Alembertian operator being split into time and spatial derivatives.
(Darn this isn't working now. You'd have to search in the book for the page, it would get you to the index of the book and you'd click on the page number to get there.. but I don't want you to do that.. I tried to screenshot it and put it in a word doc but it won't let me screenshot it... so I'll have to get latex saavy).... the below explanation won't work therefore. I'll post again tomorrow hopefully. thanks.

Then when they talk about gravity here on page 472 they say this situation is analogous to the EM situation and then on page 474 further below they call this the "wave equation".

12. Feb 7, 2008

snowstorm69

malarchy

Ok, I'm full of malarchy, my apologies. Ill nevertheless try to explain the above question and then cut to the chase.
So, 2 things, first to explain the above:
1. In the 474 page area they are talking about the linearized gravity field equations an earlier form of which they stated on page 472, as wave equations; and on page 472 they had already said that this is analogous to an EM equation. The EM equation they said this gravity "wave equation" was analagous to is foundon the top most page I tried to link to, and is the D'Alembert operator applied to the vector potential, and equated with mu times the curent density; an equation which they describe as a compact way to write the EM field equations.
So I thought this reminded me of either the scalar or the vector helmholtz equation. I was interested in seeing that in an extra dimension, 4+1-D. (The geodesic equation also looks like the wave equation to me by the way).

2. Here's my real question: is there what I'll call a "wave equation" in 4+1 or 5 dimensions? I mean by this an equation analagous to the *Vector* Helmholtz equation of Electromagnetics that describes a propagating EM wave. If so I'd like to know where I can read about it and see it.

-Snowstorm69

Last edited: Feb 7, 2008
13. Feb 7, 2008

Mentz114

I can't see the pages in question, but I will say that all wave equations in 1,2,3 or 4 dimensions that I've seen are the same in relating the spatial dependence of something to its temporal dependence.

This link has a good summary, and a section on more than 3 dimensions.

http://en.wikipedia.org/wiki/Wave_equation


text:
#### Archived

This topic is now archived and is closed to further replies.

# Couple of Newbie Q's

## Recommended Posts

Sup, I have a couple of doubts... now please don''t kill me for asking this question. What is the difference between a polygon and a Quad.. of course I know what it means in Math but in OpenGL when I construct a Quad and use the same vertices in a Polygon it doesn''t work. It took me 4 hours just to realize this. Example : void DrawCube() { glBegin(GL_QUADS); glVertex3f(-1.0f,1.0f,1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glVertex3f(1.0f, 1.0f, -1.0f); glVertex3f(1.0f, 1.0f, 1.0f); glColor3f(0.23f,0.21f,.21f); glVertex3f(1.0f, 1.0f, 1.0f); glVertex3f(1.0f, -1.0f, 1.0f); glVertex3f(-1.0f,-1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glVertex3f(1.0f,-1.0f,1.0f); glVertex3f(1.0f,-1.0f,-1.0f); glVertex3f(1.0f,1.0f,-1.0f); glVertex3f(1.0f,1.0f,1.0f); glVertex3f(-1.0f,-1.0f,1.0f); glVertex3f(-1.0f,-1.0f,-1.0f); glVertex3f(-1.0f,1.0f,-1.0f); glVertex3f(-1.0f,1.0f,1.0f); glVertex3f(-1.0f,-1.0f,-1.0f); glVertex3f(-1.0f,-1.0f,1.0f); glVertex3f(1.0f,-1.0f,1.0f); glVertex3f(1.0f,-1.0f,-1.0f); glVertex3f(1.0f,-1.0f,-1.0f); glVertex3f(1.0f,1.0f,-1.0f); glVertex3f(-1.0f,1.0f,-1.0f); glVertex3f(-1.0f,-1.0f,-1.0f); glEnd(); } Would not have the same effect if I put in GL_POLYGONS. Why? A diagram would help if you can. Another question is what does glRotatef() actually do? Could someone please try to explain the following code : int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd) { .... .... i+=1.0f; glTranslatef(0.0f,0.0f,-15.0f); DrawCube(); glRotatef(i,0.0f,-1.0f,-5.0f); glTranslatef(0.0f,6.0f,0.0f); glRotatef(i,0.0f,-1.0f,-1.0f); DrawCube(); ... ... } End result 1 cube revolving around another. I would like to know how exactly this came about with the math. I really appreciate all the help. Thanks.

##### Share on other sites
A Quad defines 4 (four) points.
A polygon defines an undefined number of points.
In both cases, you have to make sure that the points are coplanar (eg lie in the same plane) otherwise results for drawing are undefined.

With glBegin(GL_QUADS), OpenGL will take every group of 4 points to make quads, eg OpenGL will create 6 quads.
With glBegin(GL_POLYGONS), OpenGL will simply try to create one polygon with 26 points ! Because I bet those points are not coplanar, OpenGL may not draw or draw incorrectly the polygon.

##### Share on other sites
I tend to disagree with the explanation of the points having to be coplanar. The following is code for a cube created with polygons :
glBegin(GL_POLYGON);
glVertex3f(0.0f, 0.0f, 0.0f); // top face
glVertex3f(0.0f, 0.0f, -1.0f);
glVertex3f(-1.0f, 0.0f, -1.0f);
glVertex3f(-1.0f, 0.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 0.0f); // front face
glVertex3f(-1.0f, 0.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glVertex3f(0.0f, -1.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 0.0f); // right face
glVertex3f(0.0f, -1.0f, 0.0f);
glVertex3f(0.0f, -1.0f, -1.0f);
glVertex3f(0.0f, 0.0f, -1.0f);
glVertex3f(-1.0f, 0.0f, 0.0f); // left face
glVertex3f(-1.0f, 0.0f, -1.0f);
glVertex3f(-1.0f, -1.0f, -1.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 0.0f); // bottom face
glVertex3f(0.0f, -1.0f, -1.0f);
glVertex3f(-1.0f, -1.0f, -1.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 0.0f); // back face
glVertex3f(-1.0f, 0.0f, -1.0f);
glVertex3f(-1.0f, -1.0f, -1.0f);
glVertex3f(0.0f, -1.0f, -1.0f);
glEnd();

Thanks newayz.

##### Share on other sites

for question 2 do you want the short answer or the long answer? if it is the short answer then here goes:

Do you know about matrices? well the identity matrix is this:

1, 0, 0, 0
0, 1, 0, 0
0, 0, 1, 0
0, 0, 0, 1

When you do say glRotate3f(x, 0.0f, 0.0f, 1.0f); you change it to this:

cos(x), -sin(x), 0, 0 <- (a)
sin(x), cos(x), 0, 0 <- (b)
0 , 0 , 1, 0 <- (c)
0 , 0 , 0, 1

(a) & (b) are responsible, when multiplied by your point, for changing the x and y co-ordinates to produce your rotated point

(c) makes sure that the z co-ordinate is left alone, because when rotating around the z axis, the z co-ordinate stays the same.

Phew! if you still don't understand anything, ask me.

Edited by - baldurk on February 5, 2002 2:13:43 PM

##### Share on other sites
  int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd){........i+=1.0f;glTranslatef(0.0f,0.0f,-15.0f);DrawCube();glRotatef(i,0.0f,-1.0f,-5.0f);glTranslatef(0.0f,6.0f,0.0f);glRotatef(i,0.0f,-1.0f,-1.0f);DrawCube();......}

Let''s get into some walkthrough :

  int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd){........

This is a simple header for Windows Main Procedure. This has nothing really interesting in this topic.

  i+=1.0f;

This increments i at each frame.
This value is meant to be angle, according to the following instructions (we''ll talk about them later).

  glTranslatef(0.0f,0.0f,-15.0f);DrawCube();

First of all, glTranslatef moves the origin of the world to the coordinates (x,y,z)=(0,0,-15)
It translates the world "into" the screen because in OpenGL the viewpoint looks towards the negative Z axis. So, moving the origin into the negative Z axis (at -15 in this case) causes the future scene to be visible. If Z value was positive, the scene would not be visible (or at least, less visible).
Secondly, the cube is drawn. Because the DrawCube() function draws a cube centered at (0,0,0), the previous translation causes the cube to be centered at (0,0,-15).
Note that this cube will always be displayed at the same position with the same orientation.

  glRotatef(i,0.0f,-1.0f,-5.0f);glTranslatef(0.0f,6.0f,0.0f);glRotatef(i,0.0f,-1.0f,-1.0f);

Ah, there''s your beloved glRotatef function
glRotatef rotates the world around an axis.
In glRotatef, the first argument is the angle of rotation, in degrees, and the three other arguments define the rotation axis.
For the first call glRotatef(i,0.0f,-1.0f,-5.0f) the rotation angle is i, and the rotation axis is (x,y,z)=(0,-1,-5).
Imagine an axis with a length of 1 unit down, and 5 units into the screen : glRotatef makes the world turning around this axis.
Because the value of i is incremented at each frame, the world will rotate more and more every frame.

The second call, glTranslatef, causes the world to move 6 units toward the left axis. But because the world rotated, the left axis does not define the left _screen_ axis. It defines somewhat inclined axis.

The third call, glRotatef, causes the world to rotate again around itself, but this time with an axis of (x,y,z)=(0,-1,-1).

  DrawCube();

This time we draw a second cube.
Because the world has moved ans rotated, the cube will not be draw like the first one.
Since the cube is centered on its local origin, it will be drawn on the bizarre origin which is inclined and has moved.
Note that this draw depends on previous glRotatef and glTranslatef calls, which means that the cube will move and rotate during the time because i changes at each frame.

The result is just what you expected.
I hope I was clear enough.
I did as best as I could to write some English

##### Share on other sites
Ooops I wrote the _long_ answer

About your cube written in one POLYGON it may not work. In fact, it can work if you''re lucky but you shouldn''t play with that since the implementation is random.

##### Share on other sites
Thanks Baldurk and Vincoof,
Still not completely clear vincoof. I sorta got the idea about the rotation of the world about the axis. But why exactly does only the second cube move and rotate and not the first one.Feel free to put in the math for the above Q, I'm well versed in it ;-) and what exactly is the sin, cos and tan angles in the rotation matrix specify. How would I specify, say a circle formula, as the rotation path... is there any way to do this?
If the world rotates when calling glRotate then everything on the screen should rotate right? Is there anyway to have an entity not rotating when calling the glRotate function.
Sorry bout asking so many Qs but I'm trying to understand every nut and bolt in OpenGL.
BTW, I got the cube made out of Polygons from the OpenGL game programming book. I spent 4 hours trying to construct a similar cube out of polygons but it wouldn't work. I'm wondering how the author acheived it.
Thanks again, I really appreciate it.

Edited by - mAdMaLuDaWg on February 5, 2002 2:58:08 PM

Edited by - mAdMaLuDaWg on February 5, 2002 3:00:53 PM

Edited by - mAdMaLuDaWg on February 5, 2002 3:51:47 PM

##### Share on other sites
As NeHe would said himself : "you''re more than welcome".
Don''t worry about the number of Qs. The board would be boring as hell if there was no Q

I won''t put any advanced math beause if I had to, it would get very complicated, and would not be very useful.

When you call glRotatef, you rotate the world.
But that does not mean that the previous world is rotated. That means that the future world will be rotated. In fact, you prepare the world you are going to draw, but what is already drawn is drawn and you won''t change it with a glRotate.

It''s about the difference between world coordinates and local coordinates.
World coordinates give a reference. Local coordinates follow the transformation matrix.

Think about a scene that you would draw in real life. Imagine that you are a human with super-powers and you can create cubes and spheres from magic.
To draw the scene is like taking a photo : you set the camera somewhere, then you organize the objects you want to see, then you *click* on the camera.
So, first of all, set your camera somewhere. At this time, you hold the camera in your hands : your location and camera''s location are the same. Now place this camera on a pedestal, so you can fix the camera somewhere while you can move around. Ok. the camera is on a fixed pedestal. The world coordinates are referenced by the camera.
Now you (you as human) move two steps forward, without moving the camera (which is now fixed on the pedestal). You have ''translated'' from 2 steps in the ''field of view'' of the camera. *You* represent the local coordinates. Everything that you will create will be created on the place where you are. Now use your magic to create a cube and set in on the ground. The cube position depends on where you are because *you* represent the local coordinates. It is centered on (0,0,0) on *you* but not relatively to the camera (relatively to the camera, the cube is 2 steps forward). Now you move 3 steps forward again. And you place a sphere. The sphere will be set on you (eg at coordinates (0,0,0) around you) but will be 5 steps forward the camera. But because *you* moved, neither the camera nor the cube, the cube is still 2 steps forward the camera ! That''s exactly what happens when you call glTranslatef : the local origin (you, in this example) moves, so new objects will be placed at this new position, but old objects do not change. You just have to imagine what the camera views to understand what is drawn.
The rotation is very simple : for instance, you have to turn 90degrees left on yourself. Note that if you place another sphere now, it will still be 5 steps forward the camera. Now you move 10 steps forward. And what happens ? You have moved 10 steps left relatively to the camera ! If you create a cube now, it will appear 5 steps sorward and 10 steps left relatively to the camera.

Phew,
I''m sorry for this bizarre example, but I hope I helped a little

##### Share on other sites
Thanks a billion vincoof,
That was an awesome illustration, it was real neat. How did you come up with that!!?? That cleared up a great deal of confusion for me.
Another dumb doubt if someone could answer : if I were rotating a cube placed at (0,0,0) about (0,-1,-1) would it be any different if I rotated about (0,-10,-10). I tried it and it doesn''t look like it is any different, and I don''t think it would, but I would like to hear that come out of an expert''s mouth.
Thanks again vincoof.

##### Share on other sites
No there wouldn''t be any difference at all since the rotation axis designed by the vector (0,-1,-1) is exactly the same as the axis designed by the vector (0,-10,-10).
The obvious mathematical explanation is that the vector is normalized before it is used for rotation.
And for both vectors, the normalized vector is (0,-sqrt(2)/2,-sqrt(2)/2).

And thank you for the nice comments
I just thought that this example would illustrate the OpenGL rendering. I wasn''t sure that it would be clear. I''m glad that it is !

• ### Forum Statistics

• Total Topics
628367
• Total Posts
2982280

• 10
• 9
• 13
• 24
• 11


text:
# Generate schedule planner between two given dates

I am trying to generate a table with the following format:

I am looking for a way to generate the dates given the initial week (In this case Jun 3 - 7)

I tried using the package datenumber but I am only able to set a counter for the initial date (Jun 3, 2019) using \datedate but I obtained the long date format "June 3, 2019".

\usepackage{datenumber}
\newcommand{\dnext}{
\datedate
}
\begin{document}
\setdatenumber{2019}{6}{3}
\begin{tabular}{ccc}
Week  & Dates & Activity\\
1 & \datedate & Some values \\
2 &\pnext & Some values \\
\end{tabular}
\end{document}

My questions are basically the following two:

• Deal with the two counters
• Change the format to the desired one.

I appreciate any suggestion.

If your MWE is really representative if what you are trying to do then I would write a macro that just accepts a comma separated list of "activities" and produces the table from this data. In any case, this would allow you to produce

using

\activities{Walked dog, Ate lunch, Slept}

The trick is to use \docsvlist from the etoolbox package, together with some gratuitous styling via the booktabs package.

With regards to formatting the dates, datenumber defines counters dateday and datemonth for the day and month. So my first thought was that it was enough to wrap these into a macro where you add 4 to the current day:

\newcommand\weekdate{%
\ifcase\value{datemonth}%
\or Jan \or Feb \or Mar \or Apr \or May \or Jun
\or Jul \or Aug \or Sep \or Oct \or Nov \or Dec
\fi
\arabic{dateday}--\the\numexpr\arabic{dateday}+4\relax%
}

Unfortunately, this does not really work because, for example, January does not have 35 days. To take the lengths of the months properly into account you need something like:

\newcommand\weekdate{%
\setmydatebynumber{\the\numexpr\thedatenumber+4}{endofweekyear}{endofweekmonth}{endofweekday}
\ifcase\value{datemonth}%
\or Jan \or Feb \or Mar \or Apr \or May \or Jun
\or Jul \or Aug \or Sep \or Oct \or Nov \or Dec
\fi
\arabic{dateday}--\arabic{endofweekday}%
}

This works but it is very slow to compile. I'm also not sure about writing Jul 29-2 instead of Jul 29-Aug 2, but this seems to be what the OP asks for. It is easy enough to modify the code above to produce Jul 29-Aug 2 if this is what is really wanted.

Here is the full code:

\documentclass{article}
\usepackage{datenumber}
\usepackage{etoolbox}
\usepackage{booktabs}
\newcounter{endofweekday}
\newcounter{endofweekmonth}
\newcounter{endofweekyear}
\newcommand\weekdate{%
\setmydatebynumber{\the\numexpr\thedatenumber+4}{endofweekyear}{endofweekmonth}{endofweekday}
\ifcase\value{datemonth}%
\or Jan \or Feb \or Mar \or Apr \or May \or Jun
\or Jul \or Aug \or Sep \or Oct \or Nov \or Dec
\fi
\arabic{dateday}--\arabic{endofweekday}%
}
\newcounter{activity}
\newcommand\activities[1]{
\renewcommand*\do[1]{%
\stepcounter{activity}%
\setdatebynumber{\thedatenumber}%
\arabic{activity}
& ##1 \\
}
\begin{tabular}{cll}\toprule
Week  & Dates & Activity\\\midrule
\docsvlist{#1}
\bottomrule
\end{tabular}
}

\begin{document}
\setdatenumber{2019}{7}{22}
\activities{Walked dog, Ate lunch, Slept}
\end{document}

You could further embellish this by making the starting date an optional argument to \activities.

• Thanks @Andrew that helps a lot!! – C. Zhihao Jun 1 at 16:40


text:
# Sum over k of r by r+kt to the Power of k-1 over k Factorial by Power of z

## Theorem

Let $x$ be the continuous real function of $z$ which satisfies:

$\ln x = z x^t$

where $x = 1$ when $z = 0$.

Then:

 $\displaystyle x^r$ $=$ $\displaystyle \sum_{k \mathop \ge 0} \dfrac {r \left({r + k t}\right)^{k - 1} } {k!} z^k$ $\displaystyle$ $=$ $\displaystyle 1 + r z + \dfrac {r \left({r + 2 t}\right)} 2 z^2 + \cdots$


text:
# Thread: Why Is The Moon Not Spinning Then?

1. Ken, again you have shot yourself in the foot (Same as with the Foucault pendulum)!

Yes I watched YouTube video (link below)* of the Russian blond's hammer throw - the slow motion frames just before the ball hit the ground. The chain and handle grip are always stretched out from the ball in straight line by the centrifugal force of the spinning ball.

This straight line of chain does revolve around the spinning ball; even despite the air drag which would eventually stop the ball's spin with the chain trailing behind if the ball did not hit the Earth. The last slow motion part of the video begins with the chain out in front of the ball, but as the ball continues its spin the chain swings, first away for the recording camera, then continues to spin around to trail behind the ball and finally as it hits the ground, the chain is pointing towards the camera.

Thus the camera only records about 3/4 of one complete rotation or spin of the ball; however the slow motion sequence is only the tiny end fraction of the ball's total flight. I would estimate that during the ball's flight it made more than dozen complete 360 degree spins, but of course it too is spinning about some point only very near the center of the ball due to the relatively slight mass of the chain.

What is it you have against the very useful term "spin" to want to abolish it or at least replace it with "rotating about a barycenter" in two body cases?

Why do you not at least admit a few of your errors? For example, start by admit the sun has much more influnce on the moon than the Earth does (8.45 times more). After you have done that I will suggest the next error to admit.
----------------------------

PS later by edit: That the only poster to agree with you is Dwayne, should also give you reason to think again. He has his own POV which is always quite disconnected from reality.

2. Originally Posted by Billy T
Ken, again you have shot yourself in the foot (Same as with the Foucault pendulum)!
Billy-bob, do you have any actual proof that a Foucault pendulum would work on the moon? If so, please do post it!

Originally Posted by Billy T
Yes I watched YouTube video (link below)* of the Russian blond's hammer throw - the slow motion frames just before the ball hit the ground. The chain and handle grip are always stretched out from the ball in straight line by the centrifugal force of the spinning ball.

This straight line of chain does revolve around the spinning ball; even despite the air drag which would eventually stop the ball's spin with the chain trailing behind if the ball did not hit the Earth. The last slow motion part of the video begins with the chain out in front of the ball, but as the ball continues its spin the chain swings, first away for the recording camera, then continues to spin around to trail behind the ball and finally as it hits the ground, the chain is pointing towards the camera.

Thus the camera only records about 3/4 of one complete rotation or spin of the ball; however the slow motion sequence is only the tiny end fraction of the ball's total flight. I would estimate that during the ball's flight it made more than dozen complete 360 degree spins, but of course it too is spinning about some point only very near the center of the ball due to the relatively slight mass of the chain.

----------------------------
Since you're such an observant chap, did you notice that the Russian gal was RAPIDLY spinning her hammer in the counter-clockwise direction prior to release, but that very slow rotation of the ball you noticed was instead in the opposite CLOCKWISE direction?????

Billy-bob, putting aside the fact that ball was spinning at high rps prior to her release, and that the ball was clearly spinning much more slowly in the OPPOSITE direction AFTER the release (I say from cartwheeling prior to the release), can you explain why the ball shifted from a counter-clockwise rotation to a clockwise rotation prior to landing?

Originally Posted by Billy T
What is it you have against the very useful term "spin" to want to abolish it or at least replace it with "rotating about a barycenter" in two body cases?
Nothing wrong with the word "spin," so please re-post any comment of mine that gave you that idea????

As for "rotating about a barycenter," while many people do improperly use "rotate" when describing that, it's better usage to say "REVOLVING about a barycenter."

As in, "the earth *rotates* on its polar axis as it *revolves* around the sun."

If you prefer saying that "the earth *spins* on its polar axis as it *spins* around the sun," then that's OK by me too.

Originally Posted by Billy T
Why do you not at least admit a few of your errors? For example, start by admit the sun has much more influnce on the moon than the Earth does (8.45 times more). After you have done that I will suggest the next error to admit.
Define "more influence?" The moon's gravity affects the Earth's tidal bulges roughly twice as much as our sun's gravity affects our oceans' tidal bulges.

The Earth's gravity likewise is the stronger force that has, over the eons, caused the moon's two tidal bulges to solidify pointing towards us and not towards the sun.

---snip---
Mathematical Explanation of Tides
[ ]
Since R is small compared to D (about 1/60 of it) this is nearly equal to G * Mmoon * (2 * D * R) / D4, or (a constant) / D3. Tidal acceleration is therefore approximately proportional to the CUBE of the distance of the attracting body. If the Moon were only half as high above the Earth, the tidal accelerations would be EIGHT TIMES as great as they are now!

As it happens, both the Moon and the Sun cause such tides in our oceans. The Moon is about 400 times closer than the Sun, so it causes a tidal acceleration equal to 4003 or 64 million times that of an identical mass. But the Moon's mass is only about 1/27,000,000 that of the Sun. The result is that the Moon causes a tidal acceleration that is about 64,000,000/27,000,000 or 64/27, or a little more than double of that of the Sun. That's why the tides due to the Moon are larger than those due to the Sun.

At different times of a month, the Sun and Moon can cause tides that add to each other (called Spring Tides) (at a Full Moon or a New Moon, when their effects are lined up.) However, at First Quarter or Third Quarter Moon, the tides cause by the two sort of cancel each other out (with the Moon always winning!) and so there are lower tides then, called Neap Tides.

3. Is my post even here?

I said, a small change, like a moon having a moon, results in new variables so that we may not even exist.

4. Ken: Another way to show how silly your POV is follows:

For convenience assume the moon Earth are in “deep space” far from any other masses but all else is unchanged. I.e. the moon turns around once in exactly one orbit period, which is 28 days. Everyone but you and Dwayne describes this as “spinning” on its polar axis with period of 28 days, but you two say: “No that is not it is not spinning, it is tide-locked orbiting the barycenter without any spin.”

Now suppose a third body rapidly passed by, making a gravitational impulse (acting on the moon’s center of mass of course and applying no net torque* to the moon) which throws the moon into a new, much more elliptic, orbit about the barycenter with a period of 50 MONTHS. Now at apogee the moon is no longer keeping the same face turned towards the Earth, but turns 360 around MANY times so we see all side of the moon. (We already can see more than half of the moon as it is not now in a purely circular orbit.)

Do you at least agree it is “spinning” in its new orbit, even though it angular momentum about it polar axis is exactly what it was before the third body approached? If you do, why do you say it is NOT now spinning about its polar axis when the rotation about that axis (rate = 360degrees / 28 days) is exactly the same before as after the third body passed?

You are in the silly position of saying that the moon is spinning around it polar axis if the Moon day is 28.00001 or more Earth days long or if it is shorter than 27.999999… Earth days long; but if it happens to be rotating at exactly 28 days, then it is not spinning – it is orbiting about the barycenter!

Dwayne delights in holding silly positions, but you seem capable of more understanding. We all are trying to help you understand.
-----------------
*That is certainly possible, and the case I am assuming for simplicity, but may not be true in general.

5. Originally Posted by Reiku
Is my post even here?

I said, a small change, like a moon having a moon, results in new variables so that we may not even exist.
Hi - I don't think I saw any earlier post by you. However, I think your comment concerns how a moon(s) may influence a planet's ability to evolve life?

Earth's moon is very unusual in being so large relative to the Earth, and there are indeed theories that our moon's strong gravity was helpful in allowing life to form here.

E.g., the moon was likely very much closer to the Earth when life began to develop, thus creating massive tides and waves in our planet's primordial soup. While these early extreme conditions wouldn't be very friendly to later more advanced life forms – even so, these rough conditions would actively stir the soup, which may have been very beneficial in the beginning

As for a moon having its own moon, I won't say NO, but I don't recall that being observed in our solar system?

The problem I see, is that once these binary moons become tidally locked to each other (as Pluto and Charon are locked together), then their primary planet will eventually halt their revolution around their common barycenter, and eventually that would cause them to close together and eventually meld into one moon. Once that happened the evidence of a binary moon system would be lost.

The same thing is projected to happen to our Earth and our moon – as the theory goes, eventually the moon will tidally lock the Earth, and at that point they will both revolve around their barycenter, roughly once every 50 to 60 days – i.e., the Earth will have the same type of day the moon now has. Then, the moon would gradually close back in and meld into the Earth.

Of course, none of that will ever happen since the Earth and our moon will be consumed by our sun as it goes red-giant long before the moon tidally locks the Earth.

Ken
.

6. Originally Posted by Ken Dine
Billy-bob, do you have any actual proof that a Foucault pendulum would work on the moon? If so, please do post it!
I do not think one has been observed on the moon for 28 days. I based my statement that it would appear to turn 360 once in 28 days to an observer sitting on the moon without moving on the fact that the Foucault pendulum keeps in the same plane (or one parallel to it) fixed in space. That is its "claim to fame." - Why Foucault invented it. Even you admit that the moon turns relative to planes fixed in space. You just want (for some silly reason - see my post 124) to claim this is not spinning on it axis IFF the spin rate is exactly the same as the orbit period.
Originally Posted by Ken Dine
Since you're such an observant chap, did you notice that the Russian gal was RAPIDLY spinning her hammer in the counter-clockwise direction prior to release, but that very slow rotation of the ball you noticed was instead in the opposite CLOCKWISE direction?????
No, not originally, did I notice that, but on second viewing I agree that is what the camera records.

However two different cameras were used. One close to the Russian lady and viewing her swing the hammer around from BELOW THE PLANE IT WAS SWINGING IN. The second camera was high in the stands with a telephoto lens and looking DOWN ON THE PLANE the ball and its chain were spinning in. That one camera recorded clockwise and the other counter clockwise is EXACTLY what they should if the spin was always in the same direction.

As Ophiolite advised you: When deep in an embarrassing hole stop digging!

You do not seem to know that clockwise and counter-clockwise are RELATIVE to the viewer terms, not absolute terms independent of the viewer's position. If you have a big clock, turn it face down on the floor and then you will note that your perfectly good clock now has the hands going around counter clockwise! One camera had a view from below and the other from above so of course one recorded the VERY SAME SPIN as clockwise and the other as counter clockwise. I am losing count, but think that is error six for you in this thread.

Originally Posted by Ken Dine
...can you explain why the ball shifted from a counter-clockwise rotation to a clockwise rotation prior to landing?
I just did. - You are just adding to your list of silly statements, all based on appearances, without any understand of the facts.

You seem like a nice guy. Please stop shooting yourself in the foot and stop digging deeper in your embarrassing hole. That must hurt with both feet bleeding now.

You do seem to be trying to come to the correct POV, which I explained earlier (in post 96) to you that it is the gradient of gravity which falls off as the cube of the separation, which causes the moon to produce stronger tides than the sun despite the quadratic fall off of gravity, which causes the sun to control the motion of the moon thru space except for the very tiny (1/4 of one percent radial wobble).

Here is part of post 96 again:
Originally Posted by Billy T
...No you are wrong here too. The tides are caused by the GRADIENT of gravity not by gravity itself. The gradient falls off as the CUBE of the distance, not the square. This is why the moon is much more important than the sun in producing tides on Earth.
Just do the calculations with mass of sun at 1 AU from moon and mass of Earth at one moon /Earth separation. When calculating gravity force on moon the denominator distance is squared and the sun is much more important.
When calculating the gradients the inverse CUBE makes the moon's gradient larger at the Earth than the sun's is. So the moon does dominate the tides. Do it and then you will understand why moon dominates the tides on Earth but the sun, not the Earth, controls the moon's orbit around the sun. Earth only causes an "hardly noticicable" percentage variation or "wobble" in the distance between the moon and the sun.
You do not understand what causes the tides. I.e. that it is not gravity but the gradient of gravity.
Thus it would be interesting to hear you try to explain why there are TWO tides each day, (one on each side of the Earth), instead of just one bulge on the side of Earth towards the moon. The correct answer has is due to fact the moon's gravity is stronger on the side near to the moon than on the side most distant from the moon - I.e. depends upon the GRADIENT of the moon's gravity, not on the gravity itself....

7. Well Billy T , are you trying to say that the moon does not orbit the earth, but instead orbits the Sun in a seperate orbit from earths prime orbit around the sun.

If the moon has a spin rotation as appearantly suggested in discussion, then the moon must gain the momentum for that spin accross 638 miles of it trajectory before a cancelation of that angular trajectory which occurs every 15 minutes. So in short terms the moon acutally spins for 15 minutes before it cancels that spin motion and begins another 15 minutes of spin in the opposite direction.

DwayneD.L.Rabon

8. "Why is the moon not spinning then?"

The moon is not spinning (we don't see both sides) because it turns once on its axis for each orbit, so we see the same side, because its axis of rotation is aligned with ours, more or less .

This thread has spun a tale or two but it started to spin out with what apparent and actual spinning are. Or someone thinks they've found a hole in Newtonian mechanics again, but spin is a distinct kind of motion - we all know what it is and we can all see the moon doing it.

The question should be: "If the moon isn't spinning, why don't we see both sides?"

P.S.
Oh crap, back in the "the moon orbits around the sun, not the earth" ballpark.
The earth-moon system is coupled to the sun's gravitational influence, primarily. The moon is primarily coupled to the earth's. Any satellites between them can be coupled to either, primarily, or in a lagrange point, so coupled equally to both (earth and moon). We have observational craft orbiting earth, the moon, the sun, I'm sure there are one or two at these lagrange points.

9. Originally Posted by DwayneD.L.Rabon
Well Billy T , are you trying to say that the moon does not orbit the earth, but instead orbits the Sun in a seperate orbit from earths prime orbit around the sun.

If the moon has a spin rotation as appearantly suggested in discussion, then the moon must gain the momentum for that spin accross 638 miles of it trajectory before a cancelation of that angular trajectory which occurs every 15 minutes. So in short terms the moon acutally spins for 15 minutes before it cancels that spin motion and begins another 15 minutes of spin in the opposite direction.

DwayneD.L.Rabon
Hard to follow you, but yes Every body orbiting the sun not in a perfectly circular orbit does have changing (linear) momentum (More near the sun than at apogee) but its angular momentum is constant.

10. The maxium stable orbit for moon orbit of the earth is about 331,559 miles from earths center after this point its orbit will become erratic, where it would become oblong in orbit like a comet, as if it where to strike earth or be lost to space.

The limit of this orbit is determine by the sun. the exstent of the current orbit is due to interaction with the sun, such as the rate of motion at which the moon gets farther from the, estimated to be 3 cm per year.

In mention of the moons trajectory changes relavant to spin, the moon travels to the gravitional inductance of the sun in its motion around the earth of which it meets the center point every 15 minutes (at times tis may be as short as 7 minutes) in that time the moon has traveled 638 miles (20 miles on earth surface or 0.3 degrees) when the moon meets this inductance point the inductance force is is canceled and the moon gains next motion of inductance of the sun which is traveling in opposite motion causing the moon to turn backward (simular to sine frequency).
Variations in the time of the moon to travel to the suns inductance point cause accumulation of motion in one direction or the other to be greater at different times, therorically if enough momentum is gained in one direction the moon could actually make a complete turn.

The overall motion is simular to walking. As well this same motion may the resulting cause of the number of subtle earthquakes that occur every second or minute.

DwayneD.L.Rabon

11. Originally Posted by Ken Dine

#2 - your 4th graphic, if viewed from a planet at the center of its orbit, would be tumbling around two axes. It thus would NOT be tidally locked ...UNLESS, there were other moons close by that were causing it to tumble and keeping it from becoming tidally locked.

How do your graphics relate to the issue of whether (or not) our own moon is still *rotating* around its polar axis?
Quite simply, The only difference between the graphics are the axial tilt of the satellite. The sidereal rotation and period of revolution is the same. In the first graphic (Which BTW is the fourth graphic from a different viewpoint), you would say that the satellite tumbles around two axes, but in the 3rd, which closely resembles the orbit of the Moon, you would say that it doesn't rotate at all. Yet you have still failed to answer as where exactly between 90° and 0° axial tilt does the satellite stop all rotation, while to someone outside the system the rotation of the satellite doesn't change, just the angle at which it rotates.

Also, let's go back the the situation where you say the satellite is tumbling around two axes. This situation is very like that of Uranus. It too, essentially lays on its side as it orbits the Sun with its polar axis stationary with respect to the fixed stars. If you were to watch Uranus from the Sun, its apparent motion would be like that of graphic 4, with the exception that it would rotate around its polar axis more quickly.

A rotating body, however, does not naturally rotate around two axes, unless there is precession. Precession is caused by a torque applied to the axis of a rotating body. This torque acts at a right angle to the precession.
In this case it would have to act at a right angle to the orbital plane. However, there is nothing that can cause such a torque, and without a constant torque, there can be no precession.

Ergo, no matter what it looks like from the Sun, Uranus doesn't tumble around two axes (and neither does the satellite in the 4th graphic.) Instead, its polar axis stays fixed in one direction while it rotates around it.

And what holds for an axis of a planet of satellite holds to a face of a satellite. If a satellite keeps one face stationary with respect to the stars, it does not rotate, even though it presents all sides to the planet as it orbits.

The upshot is that, despite your earlier protest, there is a preferred frame for rotation. This is easily demonstrated. Take a bicycle wheel that is not rotating with respect to the fixed stars. You can grab it by the axle and easily turn it in any direction. Now spin it on its axle, and try to twist it, it will fight you.(and will precess as discussed above). So even if the fixed stars are not the preferred frame for rotation, they are very close to it. And thus, rotation is properly judged with respect to the fixed stars in all instances.

If our moon is still rotating around its internal polar axis one (1) time per complete orbit as some here claim, then please do name the force that has (for at least 3 billion years) kept our moon rotating around its polar axis against the torque of tidally locking?
You are arguing a tautology. Essentially, you are saying that since the moon doesn't rotate as it orbits it keeps the same face towards the Earth, and since it keeps the same face towards the Earth, it doesn't rotate.

The reverse argument is that because the Moon rotates once per orbit it keeps one face always towards the Earth.

Tidal locking locks the Moon's period of rotation to 1 rotation to one orbit. Though it doesn't keep the rotational speed matched to the orbital speed. The radians per sec swept out by the Moon's orbits speeds up and slows down from perigee to apogee, the radian per sec due to rotation however stays constant. This is what causes the libration of longitude, at different parts of the orbit the rotation speeds ahead of or lags behind the orbit. This indicates independence of rotation from orbit.

Other than the Earth and moon's mutual pull of gravity on each other (and to a lessor extent of the sun & Jupiter, etc), the only remaining force I see that's affecting the moon's motion would be the moon's own orbital motion around the Earth-moon barycenter, and the force of that orbital motion is not constant since the moon's orbital motion is speeding up as energy is transferred from the Earth through tidal braking.

Pretty graphics, though.

Ken
The Moon's orbital motion is slowing down not speeding up. Higher orbits are slower orbits and the Moon is receding from the Earth. It is gaining energy, it is just that the majority of that energy is gained as gravitational potential.

13. That's why it doesn't rotate the way other moons do.

14. Originally Posted by Janus58
The Moon's orbital motion is slowing down not speeding up. Higher orbits are slower orbits and the Moon is receding from the Earth. It is gaining energy, it is just that the majority of that energy is gained as gravitational potential.
$\omega r = v$

Is rotational speed slowing down? If not and the radius is increasing the velocity is also increasing.

Most likely the velocity is fixed and radius is getting higher and $\omega$ is decreasing.

I don't know though...but I do know what you said makes no real sense.

15. If the Moon had a moon, would that be spinning?

16. Yes.

17. Originally Posted by CheskiChips
$\omega r = v$

Is rotational speed slowing down? If not and the radius is increasing the velocity is also increasing.

Most likely the velocity is fixed and radius is getting higher and $\omega$ is decreasing.

I don't know though...but I do know what you said makes no real sense.
Orbital speed does decrease and the period of the orbit does get longer, yes.

The orbital speed of any satellite can be found by:

$V_o = \sqrt{\frac{GM}{r}}$

where r is the radius of the orbit.
G the gravitational constant
M the mass of the Planet

As r increases, Vo decreases.

The period of the orbit can be found by

$T = 2\pi sqrt{\frac{r^3}{GM}}$

Again, note how the period increases as r increases.

Lastly, the energy of a satellite can be found by the sum of its kinetic energy and potential energy or:

$E= \frac{mv^2}{2}- \frac{GMm }{r}$

OR

$E = -\frac{GMm}{2a}$

Where m is the mass of the satellite and a is the mean orbital distance.

18. Originally Posted by CheskiChips
$\omega r = v$

Is rotational speed slowing down? If not and the radius is increasing the velocity is also increasing.

Most likely the velocity is fixed and radius is getting higher and $\omega$ is decreasing.

I don't know though...but I do know what you said makes no real sense.

I agree. Janus58 just quoting the same equation isn't a sufficient explanation.

19. Are you challenging the correctness of the equations? If so, why? On what grounds?
If not, what could possibly be more sufficient than equation, which explains exactly what is happening?

20. Originally Posted by CheskiChips
$\omega r = v$
Is rotational speed slowing down? If not and the radius is increasing the velocity is also increasing.
Most likely the velocity is fixed and radius is getting higher and $\omega$ is decreasing.
I don't know though...but I do know what you said makes no real sense.
Your “most likely” gave me a good laugh. Thanks. To give you one, I will say: “Most likely, the sun will rise again tomorrow.”
Neither is a probability thing. To start where surely you can follow:

F = ma
And for circular orbiting mass, m, which is r from mass M the F is GMm/r^2.
As m appears on both sides of the equation I will drop it and chose set of units where GM = 1 so I have:

a = 1/r^2 but the acceleration a is either v^2/r or r$\omega$^2 and the second is more convient now so:

a = 1/r^2 = r$\omega$^2 and now not bothering with the left most "a part" of the equation anymore and multiplying both sides of the rest by r^2 we have:

1 = (r^3)$\omega$^2 which you may not recognize is one of Keppler’s three laws. (The third , I think by memory.) Namely that the period, P, squared is proportional to the cube of the radius r.
It is actually more general than just this circular orbit case; because the period in an elliptical orbit depends only on the longest straight line segment with end points on the elliptical orbit, which I will call “L”.
(Normally this length is called the “major axis,” but as both “m” and “a” were already used, I was desperate for different letter, so I called that length “L”)

So the more general statement of that law for elliptical orbits is:
P^2 ~ L^3 or if willing to use the strange units in which GM = 1, then P^2 = L^3.
I like these units as who the hell remembers the mass of the planets, the sun etc. or G? (Except expert workers in the field, like Janus58.) But I digress. Back to:

1 = r^3$\omega$^2 = r (v^2) which tells you, for example, that if r doubles, then the tangential velocity goes down to the square root of what it was. But when r doubles, so does the circumference and even it the tangential velocity did not decrease, it would take longer to get all the way around the orbit. I.e. the orbital period, P, is increasing or $\omega$ is decreasing. {Jeeezzz! that Janus 58 is a smart guy - he just knew this without all this work. hehehe.}

Switching to the general elliptical case (which includes circles) When L doubles, then L^3 goes up 8 times and the square of the period must too. Thus the period more than doubles. – it becomes 2(square root 2) times greater, (“most likely”) just as “most likely” the sun will rise again tomorrow, but who really knows?

Originally Posted by common_sense_seeker
I agree. Janus58 just quoting the same equation isn't a sufficient explanation.
Was the F = ma start simple enough for you?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•


text:
# Estimate probability using forward Kolmogorov equation

Given two machines, both of which have an exponential lifetime with mean $\frac{1}{2}$. There is a single repairman that can service machines at an exponential rate $1$. Assuming that the system starts in a state in which both machines are working, using a numerical method, estimate the probability that both machines are working at time 1 using forward Kolmogorov equations.

My attempt: Let $X(t) =$ # of machines that failed by time $t$. So we have 3 states: $0$, $1$ and $2$ machines failed. Order the states as $0$, $1$ and $2$, then the rate transition matrix Q is: $$Q =\pmatrix{-4 & 4 & 0\\ 1 & -3 & 2\\ 0 & 1 & -1}$$

Now, using the forward Kolmogorov equation, we would get one of the $9$ equations is:

$P'_{00}(t) = -4P_{00}(t) + P_{01}(t)$

Thus, we only need to estimate $P_{00}(1)$ from numerically solving the differential equation above. Using Euler's method with stepsize $h=1$, since the system is currently in state $0$, we have: $P_{00}(0) = 1$ and $P_{01}(0) = 0$. Thus, by Euler's method, $P_{00}(1)\approx P_{00}(0) + h(-4P_{00}(0) + P_{01}(0)) = 1 + 1(-4+0) = -3 < 0$.

My question: Why did I get the negative probability? Is it because the stepsize $h=1$ is too large? But if I set $h<1$, why does it work? I don't see the difference except the increase in the accuracy of our estimated probability.

• I don't understand, why would there be 9 equations? There are three states, so a distribution on the states is given by three nonnegative numbers. (Two, technically, because of normalization, but whatever.) So what you actually meant is $P_0=-4P_0'+P_1$. But yes, Euler's method can give horrible nonsense results when the step size is too large. – Ian Oct 25 '16 at 3:16
• In particular you generally need $h$ to be less than the reciprocal of the magnitude of the largest eigenvalues to have stability. So consider h smaller than 1/4 to be sure of sane results. – Ian Oct 25 '16 at 3:25
• I also don't see why you're doing your numerical method by hand rather than with software. In particular, if you take $h<1/4$ you will get a positive probability, but that doesn't necessarily mean it will be accurate until $h$ is a fair bit smaller still. – Ian Oct 25 '16 at 10:47
• Note though that the $A$ I was using is the transpose of your transition probability matrix. – Ian Oct 27 '16 at 3:36
• Oh, yes, so it does, because distributions are applied on the left not the right. You're correct. – Ian Oct 28 '16 at 2:59


text:
# Trigonometric Limit without L'Hopital

I am having problems solving this limit without L'Hopital or series. $$\lim_{ x\to 0 } \frac{x\cos(x) - \sin(x)}{2 x^3}$$

I tried some trigonometric manipulations without success. I tried Trigonometric identities with no luck and separating $$\frac{x\cos(x)}{2 x^3} and \frac{sin(x)}{2 x^3}$$ lead me nowhere, each of this limits are infinity. I kow the result is

$$\lim_{ x\to 0 } \frac{x\cos(x) - \sin(x)}{2 x^3} = \frac{-1}{6}$$

• You wanna use Taylor series? – Braindead Jun 24 '15 at 0:55
• Actually not, I am trying to solve it algebraically - thank you for your answer – Antonio Velazquez Bustamante Jun 24 '15 at 0:57
• Well, you will have to use some properties of $\sin$ and $\cos$ - which would you accept as algebraic, if you are reluctant to use the first few term of the Taylor series? – Damian Reding Jun 24 '15 at 1:20
• Thank you. I tried some trigonometric manipulation without success. The idea is to avoid the indetermination without l hopital or series. – Antonio Velazquez Bustamante Jun 24 '15 at 1:35

since $$\lim_{x\to 0}\dfrac{x\cos{x}-\sin{x}}{2x^3}=\lim_{x\to 0}\dfrac{-\cos{x}(\tan{x}-x)}{2x^3}=-\lim_{x\to 0}\dfrac{\tan{x}-x}{2x^3}$$ Use this two inequality $$\tan{x}>x+\dfrac{1}{3}x^3\Longrightarrow \dfrac{\tan{x}-x}{2x^3}>\dfrac{1}{6},x\in [0,\dfrac{\pi}{2})$$ Other hand $$\tan{x}<\dfrac{3x}{3-x^2}\Longrightarrow \dfrac{\tan{x}-x}{2x^3}<\dfrac{1}{2(3-x^2)},x\in [0,\dfrac{\pi}{2})$$ so $$\lim_{x\to\infty}\dfrac{\tan{x}-x}{2x^3}=\dfrac{1}{6}$$ so $$\lim_{x\to 0}\dfrac{x\cos{x}-\sin{x}}{2x^3}=-\dfrac{1}{6}$$
• how do you prove those two inequalities about $\tan x$ without using derivatives? – Paramanand Singh Oct 8 '15 at 10:06


text:
Share

Books Shortlist

A Voltage V = V0 Sin ωt is Applied to a Series LCR Circuit. Derive the Expression for the Average Power Dissipated Over a Cycle. - CBSE (Science) Class 12 - Physics

ConceptAc Voltage Applied to a Series Lcr Circuit

Question

A voltage V = V0 sin ωt is applied to a series LCR circuit. Derive the expression for the average power dissipated over a cycle. Under what condition (i) no power is dissipated even though the current flows through the circuit, (ii) maximum power is dissipated in the circuit?

Solution

Voltage V=V0sinωt is applied to an series LCR circuit.

Current is  π2" role="presentation" style="position: relative;">π2

I_0=V_0/Z

phi=tan^(-1)((X_C-X_L)/R)

Instantaneous power supplied by the source is

P=VI

=(V0sinωt)×(I0sin(ωt+ϕ)

=(V_0I_0)/2[cosphi-cos(2omegat+phi)]

The average power over a cycle is average of the two terms on the R.H.S of the above equation. The second term is time dependent; so, its average is zero.

P=(V_0I_0)/2cosphi

=(V_0I_0)/(sqrt2sqr2)cosphi

=VIcosϕ

P=I2Zcosϕ

cosϕ  is called the power factor.

Case I

For pure inductive circuit or pure capacitive circuit, the phase difference between current and voltage is pi/2

:.phi=pi/2,cosphi=0

Therefore, no power is dissipated. This current is sometimes referred to as wattless current.

Case II

For power dissipated at resonance in an LCR circuit,

X_C-X_L=0, phi=0

∴ cos ϕ = 1

So, maximum power is dissipated.

Is there an error in this question or solution?
Solution A Voltage V = V0 Sin ωt is Applied to a Series LCR Circuit. Derive the Expression for the Average Power Dissipated Over a Cycle. Concept: Ac Voltage Applied to a Series Lcr Circuit.
S


text:
dc.contributor.author Biswas I. en_US dc.contributor.author Dan A. en_US dc.contributor.author Paul A. en_US dc.date.accessioned 2017-04-24T10:55:47Z dc.date.available 2017-04-24T10:55:47Z dc.date.issued 2017-04-01 dc.identifier.issn 0025-2611 dc.identifier.uri http://hdl.handle.net/20.500.11824/667 dc.description.abstract A theorem of Weil and Atiyah says that a holomorphic vector bundle $E$ on a compact Riemann surface $X$ admits a holomorphic connection if and only if the degree of every direct summand of $E$ is zero. Fix a finite subset $S$ of $X$, and fix an endomorphism $A(x)\, \in\, \text{End}(E_x)$ for every $x\, \in\, S$. It is natural to ask when there is a logarithmic connection on $E$ singular over $S$ with residue $A(x)$ at every $x\, \in\, S$. We give a necessary and sufficient condition for it under the assumption that the residues $A(x)$ are rigid. en_US dc.format application/pdf en_US dc.language.iso eng en_US dc.publisher Manucripta Mathematica en_US dc.relation info:eu-repo/grantAgreement/EC/FP7/615655 en_US dc.relation ES/1PE/SEV-2013-0323 en_US dc.rights info:eu-repo/semantics/openAccess en_US dc.rights.uri http://creativecommons.org/licenses/by-nc-sa/3.0/es/ en_US dc.subject Logarithmic connection en_US dc.subject residue en_US dc.subject rigidity en_US dc.subject logarithmic Atiyah bundle en_US dc.title Criterion for logarithmic connections with prescribed residues en_US dc.type info:eu-repo/semantics/article en_US dc.type info:eu-repo/semantics/publishedVersion en_US dc.identifier.doi 10.1007/s00229-017-0935-6 dc.relation.publisherversion http://link.springer.com/article/10.1007/s00229-017-0935-6 en_US

### This item appears in the following Collection(s)

Except where otherwise noted, this item's license is described as info:eu-repo/semantics/openAccess


text:
# Using substitution method solve 3x+4y=7 2x-3y=-1

Using substitution method solve
$3x+4y=7$
$2x-3y=-1$
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Faiza Fuller
From the second equation, $2x=3y-1$, so $x=\frac{3y-1}{2}.$
Substitute for x in the first equation:
$3\frac{3y-1}{2}+4y=7$, multiply each side by 2:
$3\left(3y-1\right)+8y=14,9y-3+8y=14,17y=17,y=1,$ therefore $x=\frac{3-1}{2}=\frac{2}{2}=1$.
Solution: x=1, y=1.


text:
## iiAriana one year ago Solve negative 7 over 3, the whole multiplied by x minus 3 equals negative 52. 21 39 45 59

1. anonymous

What do you mean the whole thing? The only thing I can see that we would solve is x.

2. LynFran

$-\frac{ 7 }{ 3 }(x-3)=-52$

3. LynFran

?

4. iiAriana

It's like this (-7/3) * -3 = -52

5. iiAriana

Yes it's like what @LynFran did

6. LynFran

$-\frac{ 7 }{ 3}x+7=-52$$-\frac{ 7 }{ 3 }x=-52-7$

7. LynFran

now to find x,...divide both sides of the equation by $-\frac{ 7 }{ 3 }$

8. iiAriana

Ok

9. iiAriana

@LynFran I did it and got 39?