Calculate the sphericity of a particle (Wikipedia formula) - Java java.lang

Java examples for java.lang:Math Calculation

Description

Calculate the sphericity of a particle (Wikipedia formula)

Demo Code

/*/*from   w w w  .  j a  v a  2s .  c o m*/
 *                  Corsen development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU General Public Licence version 2 or later. This
 * should be distributed with the code. If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/licenses/gpl-2.0.txt
 *
 * Copyright for this code is held jointly by the microarray platform
 * of the ?cole Normale Sup?rieure and the individual authors.
 * These should be listed in @author doc comments.
 *
 * For more information on the Corsen project and its aims,
 * or to join the Corsen google group, visit the home page
 * at:
 *
 *      http://transcriptome.ens.fr/corsen
 *
 */
//package com.java2s;

public class Main {
    /**
     * Calculate the sphericity of a particle (Wikipedia formula)
     * @param volume Volume of the particle
     * @param area area of the particle
     * @return the sphericity of the particle
     */
    public static final double sphericite3(double volume, double area) {

        return (Math.pow(Math.PI, 1.0 / 3.0) * Math.pow(6.0 * volume,
                2.0 / 3.0)) / area;
    }
}

Related Tutorials