Some algorithmic texture generation with Mathematica

The LineIntegralConvolutionPlot[] function in Mathematica is defined by the Wolfram Mathematica Documentation Center as :

generates a line integral convolution plot of white noise with the vector field {vx,vy}.

LineIntegralConvolutionPlot[] can also generate the plot of an image convolved with a vector field .

I will give some plots of line integral convolutions of a number of vector fields . These plots have often visually appealing forms.

Here is the first plot :

line integral convolution

The Mathematica code for the image above is :

Mathematica code 1

Below are some more line integral convolution plots using various “ColorFunction” options .The frame has been removed from these plots :

This slideshow requires JavaScript.

And below is another line integral convolution plot with the external frame modified with Photoshop . Looks like a nice piece of art … 

plot with frame


The Mathematica code for the image above is :

code for plot


A last example of a line integral convolution plot with a large size :


Mathematica code for the image above ;


For more information about this subject see for example the Wikipedia article about  Line Integral Covolution .


About the definition and the branches of mathematics , and some quotes .

The material for this post is taken or inspired from two answers I wrote at about mathematics.

First I’ll start with a general definition of mathematics taken from the Encyclopedia Britannica (click here to view the online source ) :

“Mathematics, the science of structure, order, and relation that has evolved from elemental practices
of counting, measuring, and describing the shapes of objects. It deals with logical reasoning and
quantitative calculation, and its development has involved an increasing degree of idealization and
abstraction of its subject matter. Since the 17th century, mathematics has been an indispensable
adjunct to the physical sciences and technology, and in more recent times it has assumed a similar
role in the quantitative aspects of the life sciences.”

There are numerous (a word related to number , and hence to mathematics) branches and areas in mathematics , and they are all related and interconnected in one way or another.
Branches can also be divided into sub-branches .

The image below is a combination of (mathematical) images , it was made with Photoshop.

math images

Here are a few examples of mathematical branches or fields of study :
Some would say that the main branches of mathematics are algebra , geometry , and arithmetic (the science of numbers was an important branch of mathematics until the Middle Ages) , others would add analysis , logic , etc.

Algebra generally comprises abstract algebra , the study of rings and fields , linear algebra , and vector spaces. Arithmetic and number theory are viewed as sub-fields of algebra , as well as group theory , representation theory (the study of the elements of algebraic structures as transformations of vector spaces) , homological algebra , commutative algebra …

Analysis involves infinitesimal quantities and the passage to a limit . It comprises (integral and differential ) calculus , vector analysis , complex analysis , real analysis , Fourier analysis , the study of differential equations …

Geometry , the study of space , shapes , and sizes , includes differential geometry , algebraic geometry , analytic geometry , affine geometry , projective geometry , Euclidian and non-Euclidian geometry , noncommutative geometry , topology , etc.

The theory of the foundations of mathematics includes the study of mathematical and symbolic logic , set theory , model theory , proof theory ,…

Pure mathematics is sometimes distinguished from applied mathematics , which comprises disciplines such as probability theory and statistics , numerical analysis , computer algebra , …

Other fields of mathematics include combinatorics , graph theory , ergodic theory , etc.

All the branches of mathematics are used in various ways by the exact sciences  (physics , astronomy , …) and by the social sciences. There is by the way an area of mathematics called ‘mathematical physics’ .

A certain field of mathematics is sometimes interconnected with a number of other fields of mathematics. For example , tensor analysis is closely related to differential geometry , multilinear algebra , mathematical physics , algebraic topology , …

Below are some useful links about the branches of mathematics :

Branches of Mathematics

Areas of mathematics

Glossary of areas of mathematics

Next I give some revealing quotes , opinions and definitions  about mathematics:

  • “Mathematics is the most beautiful and most powerful creation of the human spirit.”
    Stefan Banach.
  • “Philosophy is written in that great book which ever lies before our eyes — I mean the universe — but we cannot understand it if we do not first learn the language and grasp the symbols, in which it is written. This book is written in the mathematical language, and the symbols are triangles, circles and other geometrical figures, without whose help it is impossible to comprehend a single word of it; without which one wanders in vain through a dark labyrinth.”
    Galileo Galilei .
  • “Neglect of mathematics work injury to all knowledge, since he who is ignorant of it cannot know the other sciences or things of this world. And what is worst, those who are thus ignorant are unable to perceive their own ignorance, and so do not seek a remedy.”
    Roger Bacon.
  • “Mathematics knows no races or geographic boundaries; for mathematics, the cultural world is one country.”
    David Hilbert .
  • “Mathematics expresses values that reflect the cosmos, including orderliness, balance, harmony, logic, and abstract beauty.”
    Deepak Chopra .
  • “Solving a problem for which you know there’s an answer is like climbing a mountain with a guide, along a trail someone else has laid. In mathematics, the truth is somewhere out there in a place no one knows, beyond all the beaten paths. And it’s not always at the top of the mountain. It might be in a crack on the smoothest cliff or somewhere deep in the valley.”
    Yōko Ogawa
  • “[When asked why are numbers beautiful?] It’s like asking why is Ludwig van Beethoven’s Ninth Symphony beautiful. If you don’t see why, someone can’t tell you. I know numbers are beautiful. If they aren’t beautiful, nothing is.”
    Paul Erdős .
  • “Beauty is the first test: there is no permanent place in the world for ugly mathematics.”
    G.H.Hardy .
  • “Everyone knows what a curve is, until he has studied enough mathematics to become confused through the countless number of possible exceptions.”
    Felix Klein .
  • “But in my opinion, all things in nature occur mathematically.”
    René Descartes .
  • “The study of mathematics is apt to commence in disappointment… We are told that by its aid the stars are weighed and the billions of molecules in a drop of water are counted. Yet, like the ghost of Hamlet’s father, this great science eludes the efforts of our mental weapons to grasp it.”
    Alfred North Whitehead .
  • “Guided only by their feeling for symmetry, simplicity, and generality, and an indefinable sense of the fitness of things, creative mathematicians now, as in the past, are inspired by the art of mathematics rather than by any prospect of ultimate usefulness.”
    E.T.Bell .
  • “Mathematics takes us into the region of absolute necessity, to which not only the actual word, but every possible word, must conform.”
    Bertrand Russell .
  • “The object of pure physics is the unfolding of the laws of the intelligible world; the object of pure mathematics that of unfolding the laws of human intelligence.”
    James Joseph Sylvester .
  • “Mathematics is the music of reason. To do mathematics is to engage in an act of discovery and conjecture, intuition and inspiration; to be in a state of confusion—not because it makes no sense to you, but because you gaveit sense and you still don’t understand what your creation is up to; to have a break-through idea; to be frustrated as an artist; to be awed and overwhelmed by an almost painful beauty; to be alive, damn it.”
    Paul Lockhart .
  • “[Replying to G. H. Hardy’s suggestion that the number of a taxi (1729) was ‘dull’, showing off his spontaneous mathematical genius] No, it is a very interesting number; it is the smallest number expressible as a sum of two cubes in two different ways, the two ways being 13 + 123 and 93 + 103.”
    Srinivasa Ramanujan .
  • “There cannot be a language more universal and more simple, more free from errors and obscurities…more worthy to express the invariable relations of all natural things [than mathematics]. [It interprets] all phenomena by the same language, as if to attest the unity and simplicity of the plan of the universe, and to make still more evident that unchangeable order which presides over all natural causes”
    Joseph Fourier .
  • “Humans are like Variables in mathematics, some Dependent, some Independent. Variables are in relationship but remain Variable. Of course, there are some Constants too both in mathematics and humans. Constants help define precisely the relationship between variables. Maybe, that is why humans keep adding (to problems), subtracting (from happiness), multiplying (what else, we are all over earth) and dividing (the earth among themselves).”
    R.N.Prasher .

These are eloquent quotes , not easy  to add to them.
The most important language one could know is not English or French or Spanish (these are of course necessary and useful) , it’s math.

Combined coherently with the rules of the scientific method  , mathematics can be used efficiently to explain and explore  the Natural and Physical World.
Applied adequately to the social sciences , mathematics can inseminate them and bring the human sciences closer and closer to the exact sciences.

One should never underestimate the power of mathematics , reasoning , and exact science.

Related online sources :

Quotes about mathematics from goodreads 

Mathematics Quotes at BrainyQuote



Question: what is the square root of 36 ? – Part Two

I will continue with answers and results equal to the square root of 36 ( originally answered at ). This time the results are mostly related to physics.

With physics one has to take into account the units and the corresponding dimensions of the equations and of the constants.

6 and the square root of 36 are dimentionless numbers , so the result must be dimentionless .
If the result is a simple fraction with numerator and denominator , then the units usually cancel out.
In other cases when one deals with logarithms one should multiply with the inverse dimensions to get a dimentionless result.
In one or two results where I didn’t look for the inverse units  I multiplied the equation with a quantity I called (U) ,  which represents the inverse of the units by which one should multiply the result to get a dimentionless number.

Here are the results :

square root of 36 physics


One possible way to explain what I have done here is the following:
If some people , living on an isolated fictitious island or on an another hypothetical planet , attached a great importance to and had a fixation on  the square root of 36 (or the number 6) for one reason or another , and got accustomed to the use of 6 as a fundamental constant ,  unit or number , then they would have likely  tried to construct a system of measurement  based on the number 6 , and  to express physics and math formulas ,equations , constants and rules in relation to 6.

After all , 6 or \sqrt{36} is equal to :

  • The floor of  2 \pi :
    2 \pi \approx 6.2831853071795864769 ;6=\lfloor 2 \pi \rfloor
  • \frac{1}{60} of the circumference of a circle in degrees.
  • It is also  one tenth of 60 seconds which make up a minute , one tenth of 60 minutes which make up an hour , one fourth of 24 hours which equal a day on Earth , one half of  12 months which make up a year , etc.
  • A peculiar ‘hexacentric’ system , so to speak.

Or this can be seen as a (creative) exploration of or exercise in advanced math and physics in order to express many equations , formulas and constants in relation to the number 6 (or \sqrt{36} ) .
Or whatever.

Apologies to Isaac Newton , Leonhard Euler , Bernhard Riemann , Einstein , Stokes , Coulomb , Avogadro , Lagrange , and others (wherever they may be) , for playing around with their equations , formulas , constants , and/or functions.

And one more addiction to this answer :

Does the future of humanity depend on answering what is the square root of  36 , or not?
Have philosophers from Antiquity to the present overlooked this fundamental question , which goes beyond the Kantian categories of space and time set out in his Critique of Pure Reason , and beyond Nietzsche’s Beyond Good and Evil , ushering the transmutation of all values and a defining moment for a new era  in the history of Humankind?
It’s just a square root , for common sense’s sake (or is it?).

Anyway , enough philosophizing.

Here are ( 3=\frac{\sqrt{36}}{2} ) more answers to \sqrt{36} , this time with images :

\sqrt{36}  is equal to :

The number subjected to a geometric rotation in the following image (done with Mathematica and some Photoshop) :

number 6 rotated

The number expressing the power and the coefficients in the equation of the curve in the polar plot below :

number 6 polar plot

The number expressing the degree of the root  and the power of the variables in the 3D plot below :

sinc number 6

The rotated number  and the polar plotted curve in the first two images  above seem to exhibit symmetry.
Symmetry is an very important property in science , math , physics , equations , nature , and wherever it is found.

Online sources and reference works related to what I have written in this answer can be found in my pages about Science books problem solvers and philosophy books in this site/blog.

Some other online sources:

Pi in the sky , and on the computer

Results and things  related to pi are usually published or made known on Pi Day . But you never know when you get inspired by π or find time to explore this ‘venerable’ math constant , and I have already published a post about pi on Pi Day . By the way there is also a Pi approximation Day (July 22) , so there’s more than one date to talk or write  about π .

Let’s kick off with an image of the value of pi (in the clouds ) with 12 decimal digits , made with Photoshop.I tried to make it realistic and show π and its numerical value ( 3. 141592653589) as part of the clouds and the sky.

pi in the shy and in the clouds

Click on the image above to see and enlarged version.

Now for some computer-based mathematical explorations related to π.
There is a known relation between e ( the base of the natural logarithm ) and π :

e^{\pi }-\pi =19.999099979 and is approximately equal to 20 or almost 20 , which is known as an almost integer.
If we try to be more accurate and find the first 1000 decimal digits for the expression above we get (with the help of Mathematica) the following number:

19.99909997918947576726644298466904449606893684322510617247010181721652594440424378488893717172543215169380461828780546649733419980514325361299208647148136824787768176096730370916343136911881572947102843075505750157713461345968680161070464780150721176248631484786057786790083331108325695374657291368002032330492961850463283115054452239990730318010838062172626769958035434209665854687644987964315998803435936569779503997342833135008957566815879735578133492779192490846222394896357465468950148911891909347185826596341254678588264050033689529697396648300564585855142666534919457239163444586998081050100236576797224041127139639108211122123659510905094871070706680635934325684092946890616346767578519812785089761055789304041857980123101280905543416254404987679233496308302396952371198509012175432057419088516489412743155057902167919927734272964964116423666794634333328342687902907792168390827162859622042360176355034576875485783678406122447755263475337650755251536818489395213976127148481818560841182505647  ,
which shows that e^{\pi }-\pi does not approach 20 completely or uniformly.

Here are some more expressions and calculations  involving π (calculated with Mathematica):

pi to the power pi
pi to the power pi and 3
powers of the square root of pi
pi and e twice powers

I think it remains to be seen if the numbers above are transcendental. The Mathematica (version 10)  command Element[z , Algebraics ] cannot determine whether these numbers belong to the domain of algebraic numbers or not.

Now let’s consider an expression containing π , e and i (the imaginary unit complex number). The following expressions are equivalent:

pi ,i ,e and z

A 2D complex plot of the last function above (with z between -4 and 4) gives the following graph (made with Maple):

2 D graph with pi ,e,i and z

A 3 D complex plot of the same function ( with z between -4-4i and 4+4i)   gives the following graph (with the help of Maple):

3 D graph of function with pi ,e and i

A general solution of the function f(z) above for f(z) = 0 is (calculated with Mathematica):

function of z qith pi ,i and e

Here is an interesting result:

Using the Mathematica commands Element[z , Algebraics ] and Not[Element[z , Algebraics ]] , it seems that the solutions z of f(z)=0 above ( for different values of the constants ) do not belong to the domain of algebraic numbers , and are therefore  transcendental numbers.

And with this I bid π farewell for now.

A note about the sinc function as a solution to a differential equation

The (infamous , or famous , take your pick) sinc function is known to be one of two solutions of the differential equation:

differential equation with sinc function as a solution

This is a linear second order ordinary differential equation with dependent variable x and independent variable y.
I have tried to explore and find the solutions to this differential equation using mostly computer math software and programs.

The Texas Instruments 92 Plus scientific calculator and the Maple computer algebra system agree and give the same solution :

sinc solution to differential equationMathematica gives the following solution:

solution with expAfter converting the exponentials to trigonometric functions the expression above and the solution of the differential equation given by Mathematica becomes:

 Mathematica sinc solution

This solution is less simple than (1). Note that if we make the assumption in Mathematica that λ > 0 ,we get the solution:

solution with lambda positiveIf we try to find the graphical representation of solution (1) for different values of the arbitrary constants c1 and c2 and with λ (or n ) between -3 and 3 ,we get the following graphs:

sinc 2d graphs solution

Then I tried to take the absolute value of λ in the numerator of (2) for different values of the arbitrary constants , and compared their graphs  with the graphs of solution (1) for the same values of the constants. λ in (2) and n in (1) are between 1 and 4.graphs of sinc solution of differential equation

The graphical results are similar but not exactly the same.

Using the Manipulate built-in function in Mathematica , here is an animation of the graphs for solution (1) obtained by varying λ , c1 and c2:

Finally , I will give the solution of a generalized form of the differential equation above

general form of differential equation

obtained with Mathematica :

solution of generalized differential equationIn the solution above , Jμ(x) is the Bessel function of the first kind , and Yμ(x) is the Bessel function of the second kind.

Some more 3D graphics related to the sinc function

I’ll finish exploring the sinc function by showing a few 3D graphs of sinc related curves.
Here is a first set of 3D curves of sinc related functions:

This slideshow requires JavaScript.

As an example , here is the Mathematica code for the 3D curve √(x² + y²)sinc(√(x² + y²)) above:

sinc code sqrt

And here is the second set of 3D surfaces related to sinc:

This slideshow requires JavaScript.

The Mathematica code for the curve given by sinc(x² -y²) is:

sinc 3d surface squared

I’m somewhat fed up with sinc , so soon I will move on to other subjects.

Update: I will add a last group of six 3D curves related to sinc . They include curves where sinc as a function of x is multiplied by sinc as a function of y , such as sinc(x)×sinc(y) , sinc(ln(x))×sinc(ln(y)) with ‘ln’ the natural logarithm to the base e  rendered as ‘log’ by Mathematica in the image , sinc(sin(x))×sinc(cos(y)) , and sinc(x²)×sinc(y²)  .

This slideshow requires JavaScript.

2D and 3D graphics related to the sinc function

After having explored calculus results related to the sinc function , here are a few 2D and 3D graphic results.

I’ll start with the integral :

integral of sinc

The graph of the function above is (made with Mathematica):

sinc functionWe’ll consider more than one way to graph this function in 3D.
First , by taking a specific function of x and y and using the following Mathematica code :

We get the 3D result :

sinc 3 d function
We can use the RevolutionPlot3D buit-in function in Mathematica to get the graph of the solid obtained from the function by revolving around the z-axis:

solid around z-axis code

sinc function z-axis
The graph of the solid obtained by revolving about the x-axis is:

sinc function x-axis
The Mathematica code for the graph above is:

code for solid x-axis
And the graph of the solid obtained from the function by revolving about the y-axis is:

3d graph about y-axis
The Mathematica code for the graph above is:

code for graph about y-axis
Next is a comparison  between the 2D graph and the 3D graph of the function sinc(tan(w)):

sinc tan
Below is a  set of six 2D graphs of sinc as a function of hyperbolic trigonometric functions:

2d sinc hyperbolic trigMathematica code for the graphs above( rd will be used in the 3D graphs later):

sinc 2d hyperbolic trig

Here are the six 3D graphs related to the above six 2D sinc graphs:

group of 3d sinc functions  trigonometric

And the Mathematica code for the 3D sinc graphs above:


Just an image about symmetry

I was thinking  about making some sort of image related to symmetry , either for general usage or  for my Twitter account , so I experimented a little with Photoshop to draw something about symmetry , which is an essential and important property in mathematics , physics , science and knowledge . Symmetry is also present in nature , art , architecture , etc

I came up first with this image :

symmetry image one


Then I noticed it wasn’t “symmetrical” enough , and I changed it till I got this  :

symmetry image two

I found this last image more satisfactory.

Wherever there is symmetry  , there is mathematics , science , precision , and all the other nice things mentioned/written/carved in the image.

Then finally I added a (symmetric) curve and “wrapped” it around the words .

Both y = \pm\frac {1} {x} and y = \pm\frac {1} {x^2} are symmetric with respect to the origin of the coordinate axes and either one of them can be used . The final image is the following one :

symmetry curve

2015 the year , the number , and some of their characteristics

The year 2015 has begun (wish it will be a happy year for everybody) and here are some properties of the corresponding number (worked out with the help of Mathematica).

First , a list of the representations of 2015  in various number base notations:

2015 base notation

2015 in roman numerals: MMXV;

2015 can be represented as:


2015=\frac {92^4 - 1} {35553}

2015-relation-1 2015-relation-2

Here is a big one (obtained with Mathematica by solving x^3 + x^2 + x = 2015 ):


2015=5 x 13 x 31


The last relation above can be  derived from the trigonometric equation:


I have mentioned these types of trigonometric relations in a previous post.

The number of prime numbers up to 2015 is 305 , the last  prime number before 2015 is 2011 ,  and the prime number which comes after 2015 is 2017.

The last Mersenne prime number before 2015 is:

The Mersenne prime number which comes after 2015 is:

The last Sophie Germain prime (n is a Sophie Germain prime if 2n + 1 is also prime) before 2015 is 2003 , and the Sophie Germain prime which comes after 2015 is 2039.

The Riemann prime counting function is given by:

Riemann prime counting function

where li(x) is the logarithmic integral and  μ(n) is the Möbius function.

And below is a graph showing the natural distribution and the number  of prime numbers π(n) less than or equal to n (blue colored curve , here n=2015) along with the distribution of primes given by the Riemann counting function (orange colored curve) up to 2015 :



Moving to other fields of science , I will mention briefly a few events taking place in the year 2015:

In the field of space exploration , the New Horizons spacecraft will get closest to the dwarf planet Pluto in July 2015.

In the following image (made with the help of Starry Night and Photoshop) the longer red arrow near the name of a planet indicates the direction towards the place where the planet is located on its orbit.

Pluto and New Horizons

The Dawn spacecraft will arrive at the dwarf planet Ceres between Mars and Jupiter in March 2015.

Concerning astronomy and sky events , there will be a solar eclipse in March 20 , a lunar eclipse in April 4 , a partial solar eclipse in September 13 , and a lunar eclipse in September 28.

And that is it for now.

Fractal graphics , curves and art

I’m presenting fractal images made with various fractal programs.

Simply put ,  fractals are  (mathematical) objects displaying self-similarity at different scales.

The images below show the Mandelbrot set , a set of complex numbers   obtained by iterating the equation z² = z + c , where c is a constant number.I used Mathematica and Fraqtive to create these images.

A set related to the Mandelbrot set is the Julia set :

Continue reading