HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/FograPC10/vXYZ.php
<?php
	# ------- The graph values in the form of associative array
	function xyz2V($v,$x,$y,$z) {
	
	
	//116*(IF($y>0.885645,($y/100)^(1/3),7.787037*N4/100+0.137931))-16
//=500*((IF(M4>0.853957,(M4/96.422)^(1/3),(7.787037*(M4/96.422))+0.137931)-(IF(N4>0.885645,(N4/100)^(1/3),(7.787037*(N4/100))+0.137931))))	

	if ($v=="x") {
		
		if (($x/96.422)>0.5914) {
			$vx=116*pow(($x/96.422),(1/3))-16;}
		else {	
			$vx=116*(7.787037*($x/96.422)+0.137931)-16;
			}
		return $vx;	
	}
		
	if ($v=="y") {
		
		if (($y/100)>0.5914) {
			$vy=116*pow(($y/100),(1/3))-16;}
		else {	
			$vy=116*(7.787037*($y/100)+0.137931)-16;
			}
		return $vy;	
	}
	

		if ($v=="z") {
		
		if (($z/82.521)>0.5914) {
			$vz=116*pow(($z/82.521),(1/3))-16;}
		else {	
			$vz=116*(7.787037*($z/82.521)+0.137931)-16;
			}
		return $vz;	
	}

}
?>