- Community Home
- :
- Code and Documents
- :
- Code Exchange
- :
- Example Programs
- :
- Find Pi via Monte Carlo Method

turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Document History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report to a Moderator

Labels:

**Overview**

This program calculates an approximation for the value of Pi via Monte Carlo Method by plotting a circle on a 200x200 square area then randomly placing dots on this area.

**Description**

This program calculates an approximation for the value of Pi by plotting a circle on a 200x200 square area then randomly placing dots on this area. By calculating the ratio of points that fall inside versus the number of points that fall outside the circle the value for pi is approximated.

**Requirements**

- LabVIEW 2012 (or compatible)

**Steps to Implement or Execute Code**

- Run the VI
- Slide the pointer on the Speed control to control the speed.

**Additional Information or References**

Front Panel

VI Snippet

**This document has been updated to meet the current required format for the NI Code Exchange.**

- Find more articles tagged with:
- carlo
- example
- generation
- math
- method
- monte
- number
- PI
- pseudorandom
- random