solution – Programmerbay https://programmerbay.com A Tech Bay for Tech Savvy Mon, 04 Jul 2022 06:19:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://programmerbay.com/wp-content/uploads/2019/09/cropped-without-transparent-32x32.jpg solution – Programmerbay https://programmerbay.com 32 32 How to fix JRE or JDK must be available in order to run Eclipse problem https://programmerbay.com/jrk-or-jdk-must-be-available-in-order-to-run-eclipse-resolved/ https://programmerbay.com/jrk-or-jdk-must-be-available-in-order-to-run-eclipse-resolved/#respond Fri, 05 Jun 2020 16:44:26 +0000 https://programmerbay.com/?p=5646 While installing Eclipse on your system, you have came across a pop-up dialog preventing you from setting up the Eclipse environment. The dialog says:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after a search following locations:… Javaw.exe in your current PATH “.

eclipse JDK

So to resolve ” no java virtual machine was found eclipse … javaw.exe in your current path ” , do the following steps :

1) Download Java Development Kit first from here .

2) Locate javaw.exe file at ” C:\Program Files\Java\jdk-12\bin ”

eclipse 3 1

3) Copy the path and use the short command “Window+ Pause” to open System Information or “Control Panel\System and Security\System

4) Click on Advanced System settings and open Environment Variables

5) Under System Variable add a new path where you have to put the variable name as PATH and paste the path which you previously copied to Path value

path

6) Apply changes and now try to run the exe file of Eclipse.

Hope, above instructions helped you.

]]>
https://programmerbay.com/jrk-or-jdk-must-be-available-in-order-to-run-eclipse-resolved/feed/ 0
Find the equation of the Bezier curve which passes through (0,0) and (-4,2) and controlled through (14,10) and (4,0) https://programmerbay.com/find-the-equation-of-the-bezier-curve-which-passes-through-00-and-42-and-controlled-through-1410-and-40/ https://programmerbay.com/find-the-equation-of-the-bezier-curve-which-passes-through-00-and-42-and-controlled-through-1410-and-40/#respond Fri, 23 Nov 2018 16:30:45 +0000 https://www.programmerbay.com/?p=2134

Solution:

B(t) = ∑ki=0   PBk,n(t)         where, 0<=t<=1

It is given that curve passes (0,0) and (-4,2), means starting point of the curve is P0 = (0,0) and P3 = (-4,2)

Whereas the curve is controlled by P1 (14,10) and P2 (4,0)

Number of control points,

P0=(0,0) ,  P1=(14,10) , P2=(4,0)  , P3=(-4,2)

 

Degree of equation n =Control_point -1 = 4 -1 = 3

B(t) = P0B0,3(t)+ P1B1,3(t) + P2B2,3(t)+ P3B3,3(t)

Where,  Bk,n(t)=  nCk    uk (1-t)n-k

 

B0,3(t)3C0    t0 (1-t)3-0

=   1(1-t) 3

               =   1(1-t) 3

             (1-t)3

B1,3(t)3C1    u1 (1-t)3-1

=   t(1-t) 2

               =   t(1-t) 2

             =  3t (1-t)2

B2,3(t)3C2    t2 (1-t)3-2

=   t2(1-t) 1

               =   t2(1-t) 1

             3t2 (1-t)1

 

B3,3(t)=  3C3   u3 (1-t)3-3

=   t3(1-t) 0

               =   t3(1-t) 0

             t3

 

B(t)=      P0 (1-t)3 + P1 3t (1-t)2+ P2 3t2 (1-t)1+ P3 t3

Now, Using this equation lets calculate equation for x control point

P0=(0,0) ,  P1=(14,10) , P2=(4,0)  , P3=(-4,2)

= 0(1-t)3 + (14)  3t (1-t)2+ (4) 3t2 (1-t)+ (-4) t3

= 42t(t2+1-2t)+ 12t2(1-t)-4t3

= 42t3+42t-84t2+12t2-12t3-4t3

=26t3-72t2+42t

Using this equation lets calculate equation for y control points

= 0(1-t)3 + (10)  3t (1-t)2+ (0) 3t2 (1-t)+ (2) t3

=30t (1+t2-2t)+2t3

=30t+30t3-60t2+2t3

= 32t3 -60t2+30t

So, The answer is P(t) =[ x(t) y(t)] =[ (26t3-72t2+42t) (32t3 -60t2+30t)]

 

 

 

 

]]>
https://programmerbay.com/find-the-equation-of-the-bezier-curve-which-passes-through-00-and-42-and-controlled-through-1410-and-40/feed/ 0