I'm trying to make a program to detect some points in curves and I want to separate 2 types of curves:


I've got a set of points that define those lines and as this is not my strong side I don't know how I can, with a set of points, separate this 2 types. Can you help me?
Notes: Ignore the green line because it's for other processing. The red dot is the point where the line changes it's direction (up-down and down-up).
EDIT:
Data for the first image:
X:1172 Y:2626
X:1174 Y:2624
X:1177 Y:2620
X:1182 Y:2615
X:1188 Y:2607
X:1194 Y:2597
X:1198 Y:2586
X:1201 Y:2576
X:1202 Y:2569
X:1203 Y:2564
X:1203 Y:2562
X:1202 Y:2562
X:1202 Y:2562
X:1202 Y:2565
X:1201 Y:2571
X:1199 Y:2581
X:1196 Y:2593
X:1193 Y:2605
X:1194 Y:2614
X:1196 Y:2623
X:1199 Y:2629
X:1203 Y:2634
X:1208 Y:2636
X:1214 Y:2637
X:1221 Y:2636
X:1227 Y:2632
X:1235 Y:2625
X:1241 Y:2620
X:1244 Y:2612
X:1245 Y:2603
X:1247 Y:2597
X:1247 Y:2593
X:1246 Y:2589
X:1244 Y:2586
X:1243 Y:2585
X:1243 Y:2585
Data for the second image:
X:1258 Y:2632
X:1264 Y:2630
X:1269 Y:2627
X:1272 Y:2624
X:1276 Y:2619
X:1281 Y:2613
X:1283 Y:2608
X:1284 Y:2602
X:1284 Y:2598
X:1283 Y:2595
X:1282 Y:2590
X:1283 Y:2588
X:1284 Y:2584
X:1286 Y:2581
X:1287 Y:2579
X:1290 Y:2579
X:1293 Y:2579
X:1300 Y:2578
X:1306 Y:2578
X:1313 Y:2578
X:1318 Y:2580
X:1323 Y:2584
X:1325 Y:2589
X:1327 Y:2595
X:1326 Y:2603
X:1325 Y:2610
X:1324 Y:2616
X:1323 Y:2620
X:1322 Y:2623
X:1322 Y:2623
X:1322 Y:2623
X:1323 Y:2621
X:1324 Y:2618
X:1326 Y:2611
X:1328 Y:2604
X:1332 Y:2597
X:1337 Y:2591
X:1344 Y:2587
X:1352 Y:2584
X:1359 Y:2582
This data is from a Livescrive smartpen.

