Open in app

Sign In

Write

Sign In

Martin McBride
Martin McBride

256 Followers

Home

About

Published in Recreational maths

·2 days ago

Parabola focus and directrix

A parabola can be defined in terms of parametric equations or alternatively in Cartesian form. An alternative way to define a parabola is as a locus of points. we will look at that form in this article. Focus and directrix The locus defining a parabola depends on a focus and a directrix. The…

Pure Mathematics

4 min read

Parabola focus and directrix
Parabola focus and directrix
Pure Mathematics

4 min read


Published in Recreational maths

·Nov 12, 2022

Maclaurin series of the exponential function

In this article we will use the Maclaurin series to find a polynomial approximation to the exponential function, e^x. The general formula for the Maclaurin series for the function f(x) is:

Maclaurin Series

4 min read

Maclaurin series of the exponential function
Maclaurin series of the exponential function
Maclaurin Series

4 min read


Published in Recreational maths

·Nov 6, 2022

Solving equations using the Newton-Raphson method

The Newton-Raphson method is a numerical method to solve equations of the form f(x) = 0. This method requires us to also know the first differential of the function. But the Newton-Raphson method has very good convergence, so it can often provide an accurate result very quickly. Example — square root of two using Newton-Raphson method As a simple…

Mathematics

7 min read

Solving equations using the Newton-Raphson method
Solving equations using the Newton-Raphson method
Mathematics

7 min read


Published in Geek Culture

·Oct 14, 2022

Pong game using Pygame — step 3

This is the third article in a series where we will develop a complete game of Pong using Pygame. In the previous steps: step 1, we created a window and displayed the bat and ball, with no animation. step 2, we animated the ball, making it bounce off the 4…

Python

5 min read

Pong game using Pygame — step 3
Pong game using Pygame — step 3
Python

5 min read


Published in Geek Culture

·Oct 8, 2022

Pong game using Pygame — step 2

Second installment in the saga. This is the second article in a series where we will develop a complete game of Pong using Pygame. In the previous step, we created a window and display the bat and ball, with no animation. In this step we will animate the ball, making…

Python

11 min read

Pong game using Pygame — step 2
Pong game using Pygame — step 2
Python

11 min read


Published in Geek Culture

·Oct 4, 2022

Custom image processing with NumPy

Use the power of NumPy to write your own image processing code. In this article, we will learn how to use NumPy to store and manipulate image data. We will use the Python Imaging Library (PIL) to read and write data to standard image file formats. This article explains how…

Python

5 min read

Custom image processing with NumPy
Custom image processing with NumPy
Python

5 min read


Published in Geek Culture

·Sep 30, 2022

How is NumPy so damn fast?

Short answer, it’s written in C, longer answer… When we talk about the efficiency of NumPy arrays (np arrays), what exactly do we mean? There are two separate issues: Efficiency of memory usage. Processing efficiency. Why are NumPy arrays more efficient than Python lists? The basic reason NumPy is more efficient is that it is written in C rather…

Python

7 min read

How is NumPy so damn fast?
How is NumPy so damn fast?
Python

7 min read


Published in Geek Culture

·Sep 27, 2022

Pong game using Pygame — step 1

First in a series of pygame articles This is the first article in a series where we will develop a complete game of Pong using Pygame. In this step, we will simply create a window and display the bat and ball, with no animation. The code for this article can…

Python

8 min read

Pong game using Pygame — step 1
Pong game using Pygame — step 1
Python

8 min read


Published in Geek Culture

·Sep 19, 2022

Looping over two lists with zip

A Pythonistic technique to avoid loop counters We sometimes need to loop over two different sequences at the same time. For example, if we had two lists: colors = ["red", "green", "blue"] shapes = ["circle", "square", "triangle"] and we wanted to print these lists side by side: red circle green square blue…

Python

5 min read

Looping over two lists with zip
Looping over two lists with zip
Python

5 min read


Published in Geek Culture

·Sep 18, 2022

Ditch loop counters, use this instead

Write more pythonic code with enumerate Even though it is often best to avoid loop counters, there are times when they can be useful. Fortunately, you don’t have to forget everything you have learnt so far — you can use the enumerate function. …

Python

4 min read

Ditch loop counters, use this instead
Ditch loop counters, use this instead
Python

4 min read

Martin McBride

Martin McBride

256 Followers

Freelance software consultant, developer, technical author. Java, Python. martinmcbride.org

Following
  • Tim Denning

    Tim Denning

  • Zulie Rane

    Zulie Rane

  • Regia Marinho

    Regia Marinho

  • The Educative Team

    The Educative Team

  • Cory Doctorow

    Cory Doctorow

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech