La distancia focal es la distancia entre el centro del espejo y los focos principales. Para determinar la distancia focal de un espejo esférico debemos conocer el radio de curvatura de ese espejo. La distancia del vértice al centro de curvatura se llama radio de curvatura.
La distancia focal es la mitad del radio de curvatura.
Fórmula :
F = ( R / 2 ) for concave mirror F = - ( R / 2 ) for convex mirror
Ejemplos:
For a convex mirror Input : R = 30 Output : F = 15 For a convex mirror Input : R = 25 Output : F = - 12.5
CPP
// C++ program to determine // the focal length of a // spherical mirror #include<iostream> using namespace std; // Determines focal length // of a spherical concave // mirror float focal_length_concave(float R) { return R / 2 ; } // Determines focal length of a // spherical convex mirror float focal_length_convex(float R) { return - ( R / 2 ) ; } // Driver function int main() { float R = 30 ; cout << "Focal length of spherical" << "concave mirror is : " << focal_length_concave(R) << " units\n"; cout << "Focal length of spherical" << "convex mirror is : " << focal_length_convex(R) << " units"; return 0; }
Java
// Java program to determine // the focal length of a // spherical mirror class GFG { // Determines focal length // of a spherical concave mirror static double focal_length_concave(double R) { return R / 2; } // Determines focal length of a // spherical convex mirror static double focal_length_convex(double R) { return -(R / 2); } // Driver function public static void main(String[] args) { double R = 30; System.out.println("Focal length of spherical " + "concave mirror is : " + (int)focal_length_concave(R) + " units"); System.out.println("Focal length of spherical " + "convex mirror is : " + (int)focal_length_convex(R) + " units"); } } // This code is contributed by Azkia Anam.
Python3
# Python 3 program to determine # the focal length of a # spherical mirror # Determines focal length # of a spherical concave mirror def focal_length_concave(R): return R / 2 # Determines focal length of a # spherical convex mirror def focal_length_convex(R): return - ( R / 2 ) # Driver function R = 30 print("Focal length of spherical concave mirror is : ", "%d"%focal_length_concave(R)," units") print("Focal length of spherical convex mirror is : ", "%d"%focal_length_convex(R)," units") # This code is contributed # by Azkia Anam.
C#
// C# program to determine // the focal length of a // spherical mirror using System; class GFG { // Determines focal length // of a spherical concave mirror static double focal_length_concave(double R) { return R / 2; } // Determines focal length of a // spherical convex mirror static double focal_length_convex(double R) { return -(R / 2); } // Driver function public static void Main() { double R = 30; Console.WriteLine("Focal length of spherical " + "concave mirror is : " + (int)focal_length_concave(R) + " units"); Console.WriteLine("Focal length of spherical " + "convex mirror is : " + (int)focal_length_convex(R) + " units"); } } // This code is contributed by vt_m.
Producción :
Focal length of spherical concave mirror is 15 units Focal length of spherical convex mirror is -15 units
Consulte el artículo completo sobre Programa para determinar la distancia focal de un espejo esférico para obtener más detalles.
Publicación traducida automáticamente
Artículo escrito por GeeksforGeeks-1 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA