# Area of a circular body

**URL:** https://phaser.discourse.group/t/area-of-a-circular-body/4504
**Category:** Phaser 3
**Created:** [December 8, 2019, 12:36pm UTC](https://phaser.discourse.group/t/area-of-a-circular-body/4504 "2019-12-08T12:36:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fselcukcan](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@fselcukcan](https://phaser.discourse.group/u/fselcukcan)
#### Post date: [December 8, 2019, 12:36pm UTC](https://phaser.discourse.group/t/area-of-a-circular-body/4504/1 "2019-12-08T12:36:03Z")

</div>

I am trying to calculate the ratio of the area of circle physical bodies, `this.areaOccupied`, in my scene to the `this.totalArea` of the scene. But the result seems not correct since even though the circles occupy a small percentage it shows more than 100%.  
[Here is the code](https://glitch.com/edit/#!/game-playground).

Briefly, I calculate total area in the `init` with:  
[`this.totalArea = this.cameras.main.width*this.cameras.main.height;`](https://glitch.com/edit/#!/game-playground?path=gameScene.js:19:2)

and the [area ocupied by spheres](https://glitch.com/edit/#!/game-playground?path=gameScene.js:105:4) in `update` and area of each sphere 1 line above.

What am I missing here? Am I calculating the areas in different pixel units?
